don't show invalid file size

This commit is contained in:
iNPUTmice 2014-10-14 19:33:35 +02:00
parent 262128c8f9
commit 3c557a1bb4

View File

@ -105,7 +105,10 @@ public class MessageAdapter extends ArrayAdapter<Message> {
boolean multiReceived = message.getConversation().getMode() == Conversation.MODE_MULTI
&& message.getMergedStatus() <= Message.STATUS_RECEIVED;
if (message.getType() == Message.TYPE_IMAGE) {
filesize = message.getImageParams().size / 1024 + " KB";
ImageParams params = message.getImageParams();
if (params.size != 0) {
filesize = params.size / 1024 + " KB";
}
}
switch (message.getMergedStatus()) {
case Message.STATUS_WAITING: