diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-07-02 23:13:00 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-07-02 23:13:00 +0200 |
commit | f5ba9d4223ca8e5dc9ce00024f69a8374d170a31 (patch) | |
tree | c4f5f5cbecee7b70641c71d70f35350aca2cad47 /src/main/java/eu/siacs/conversations/ui/adapter | |
parent | a2525346f461183125c5840498228c347a86d4aa (diff) |
refactored message context menu
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java index 8648f048..dedac77e 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -487,7 +487,7 @@ public class MessageAdapter extends ArrayAdapter<Message> { if (downloadable.getStatus() == Downloadable.STATUS_OFFER) { displayDownloadableMessage(viewHolder,message,activity.getString(R.string.download_x_file, UIHelper.getFileDescriptionString(activity, message))); } else if (downloadable.getStatus() == Downloadable.STATUS_OFFER_CHECK_FILESIZE) { - displayDownloadableMessage(viewHolder, message, activity.getString(R.string.check_image_filesize)); + displayDownloadableMessage(viewHolder, message, activity.getString(R.string.check_x_filesize, UIHelper.getFileDescriptionString(activity, message))); } else { displayInfoMessage(viewHolder, UIHelper.getMessagePreview(activity, message).first); } @@ -521,12 +521,12 @@ public class MessageAdapter extends ArrayAdapter<Message> { } else { if (GeoHelper.isGeoUri(message.getBody())) { displayLocationMessage(viewHolder,message); + } else if (message.bodyIsHeart()) { + displayHeartMessage(viewHolder, message.getBody().trim()); + } else if (message.treatAsDownloadable() == Message.Decision.MUST) { + displayDownloadableMessage(viewHolder, message, activity.getString(R.string.check_x_filesize, UIHelper.getFileDescriptionString(activity, message))); } else { - if (message.bodyIsHeart()) { - displayHeartMessage(viewHolder, message.getBody().trim()); - } else { - displayTextMessage(viewHolder, message); - } + displayTextMessage(viewHolder, message); } } |