mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 03:32:15 -05:00
update unread counter for image messages. fixes #2376
This commit is contained in:
parent
ba32217152
commit
935ac25cbd
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user