aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-10-18 21:00:53 +0200
committerChristian Schneppe <christian@pix-art.de>2016-10-18 21:00:53 +0200
commitb94b1264f4d68e0baf4c208b07cdc8d6f27b74bc (patch)
tree5cd220051ad02043888b02dfc3cc4c0726c7cc79 /src/main/java/de/pixart
parent22d7bc4ab176d701bffef02321ad56f8dba83499 (diff)
parent31d2252043acaeccdc8b7af088524fa795c35a1a (diff)
Merge branch 'master' of https://github.com/kriztan/Pix-Art-Messenger
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
index f0db05626..e3e77c589 100644
--- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
+++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
@@ -158,10 +158,12 @@ public class MessageAdapter extends ArrayAdapter<Message> {
&& message.getMergedStatus() <= Message.STATUS_RECEIVED;
if (message.getType() == Message.TYPE_IMAGE || message.getType() == Message.TYPE_FILE || message.getTransferable() != null) {
FileParams params = message.getFileParams();
- if (params.size > (1.5 * 1024 * 1024)) {
+ if (params.size > (1 * 1024 * 1024)) {
filesize = params.size / (1024 * 1024)+ " MiB";
- } else if (params.size > 0) {
+ } else if (params.size > (1 * 1024)) {
filesize = params.size / 1024 + " KiB";
+ } else if (params.size > 0) {
+ filesize = "1 KiB";
}
if (message.getTransferable() != null && message.getTransferable().getStatus() == Transferable.STATUS_FAILED) {
error = true;