diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2017-03-17 14:55:33 +0300 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2017-03-17 14:55:33 +0300 |
commit | 935ac25cbd229c4fe973b4e962c76831fd718fa0 (patch) | |
tree | ce99830c8daf8a161b642c75a56dad1a3abca2e1 /src | |
parent | ba3221715297758d85824ca87222ed8a94d286bd (diff) |
update unread counter for image messages. fixes #2376
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java index b793f9a1f..daa569de5 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java @@ -66,6 +66,12 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> { Message message = conversation.getLatestMessage(); int unreadCount = conversation.unreadCount(); + if (unreadCount > 0) { + unreadCountCustomView.setVisibility(View.VISIBLE); + unreadCountCustomView.setUnreadCount(unreadCount); + } else { + unreadCountCustomView.setVisibility(View.GONE); + } if (!conversation.isRead()) { convName.setTypeface(null, Typeface.BOLD); @@ -84,12 +90,6 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> { Pair<String,Boolean> preview = UIHelper.getMessagePreview(activity,message); mLastMessage.setVisibility(View.VISIBLE); imagePreview.setVisibility(View.GONE); - if (unreadCount > 0) { - unreadCountCustomView.setVisibility(View.VISIBLE); - unreadCountCustomView.setUnreadCount(unreadCount); - } else { - unreadCountCustomView.setVisibility(View.GONE); - } mLastMessage.setText(preview.first); if (preview.second) { if (conversation.isRead()) { |