added higher auto accept file sizes

also changed labeling to MiB and KiB
This commit is contained in:
Daniel Gultsch 2015-01-04 17:53:06 +01:00
parent d7ac9b88cf
commit e6cd92a663
2 changed files with 39 additions and 35 deletions

View File

@ -103,9 +103,9 @@ public class MessageAdapter extends ArrayAdapter<Message> {
if (message.getType() == Message.TYPE_IMAGE || message.getType() == Message.TYPE_FILE || message.getDownloadable() != null) { if (message.getType() == Message.TYPE_IMAGE || message.getType() == Message.TYPE_FILE || message.getDownloadable() != null) {
ImageParams params = message.getImageParams(); ImageParams params = message.getImageParams();
if (params.size > (1.5 * 1024 * 1024)) { if (params.size > (1.5 * 1024 * 1024)) {
filesize = params.size / (1024 * 1024)+ " MB"; filesize = params.size / (1024 * 1024)+ " MiB";
} else if (params.size > 0) { } else if (params.size > 0) {
filesize = params.size / 1024 + " KB"; filesize = params.size / 1024 + " KiB";
} }
if (message.getDownloadable() != null && message.getDownloadable().getStatus() == Downloadable.STATUS_FAILED) { if (message.getDownloadable() != null && message.getDownloadable().getStatus() == Downloadable.STATUS_FAILED) {
error = true; error = true;

View File

@ -10,15 +10,19 @@
</string-array> </string-array>
<string-array name="filesizes"> <string-array name="filesizes">
<item>never</item> <item>never</item>
<item>256 KB</item> <item>256 KiB</item>
<item>512 KB</item> <item>512 KiB</item>
<item>1 MB</item> <item>1 MiB</item>
<item>5 MiB</item>
<item>10 MiB</item>
</string-array> </string-array>
<string-array name="filesizes_values"> <string-array name="filesizes_values">
<item>0</item> <item>0</item>
<item>262144</item> <item>262144</item>
<item>524288</item> <item>524288</item>
<item>1048576</item> <item>1048576</item>
<item>5242880</item>
<item>10485760</item>
</string-array> </string-array>
<string-array name="mute_options_descriptions"> <string-array name="mute_options_descriptions">
<item>30 minutes</item> <item>30 minutes</item>