aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java10
1 files changed, 5 insertions, 5 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 4c62bb1e6..533bbf880 100644
--- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
+++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
@@ -175,7 +175,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
}
}
- private void displayStatus(ViewHolder viewHolder, final Message message, int type, boolean darkBackground, boolean inValidSession) {
+ private void displayStatus(ViewHolder viewHolder, Message message, int type, boolean darkBackground) {
String filesize = null;
String info = null;
boolean error = false;
@@ -197,10 +197,10 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
FileParams params = message.getFileParams();
if (params.size > (1 * 1024 * 1024)) {
filesize = params.size / (1024 * 1024) + " MiB";
- } else if (params.size > (1 * 1024)) {
+ } else if (params.size >= (1 * 1024)) {
filesize = params.size / 1024 + " KiB";
- } else if (params.size > 0) {
- filesize = "1 KiB";
+ } else {
+ filesize = params.size + " B";
}
if (message.getTransferable() != null && message.getTransferable().getStatus() == Transferable.STATUS_FAILED) {
error = true;
@@ -979,7 +979,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
}
}
- displayStatus(viewHolder, message, type, darkBackground, isInValidSession);
+ displayStatus(viewHolder, message, type, darkBackground);
return view;
}