mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-30 20:52:21 -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();
|
Message message = conversation.getLatestMessage();
|
||||||
int unreadCount = conversation.unreadCount();
|
int unreadCount = conversation.unreadCount();
|
||||||
|
if (unreadCount > 0) {
|
||||||
|
unreadCountCustomView.setVisibility(View.VISIBLE);
|
||||||
|
unreadCountCustomView.setUnreadCount(unreadCount);
|
||||||
|
} else {
|
||||||
|
unreadCountCustomView.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
if (!conversation.isRead()) {
|
if (!conversation.isRead()) {
|
||||||
convName.setTypeface(null, Typeface.BOLD);
|
convName.setTypeface(null, Typeface.BOLD);
|
||||||
@ -84,12 +90,6 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
|
|||||||
Pair<String,Boolean> preview = UIHelper.getMessagePreview(activity,message);
|
Pair<String,Boolean> preview = UIHelper.getMessagePreview(activity,message);
|
||||||
mLastMessage.setVisibility(View.VISIBLE);
|
mLastMessage.setVisibility(View.VISIBLE);
|
||||||
imagePreview.setVisibility(View.GONE);
|
imagePreview.setVisibility(View.GONE);
|
||||||
if (unreadCount > 0) {
|
|
||||||
unreadCountCustomView.setVisibility(View.VISIBLE);
|
|
||||||
unreadCountCustomView.setUnreadCount(unreadCount);
|
|
||||||
} else {
|
|
||||||
unreadCountCustomView.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
mLastMessage.setText(preview.first);
|
mLastMessage.setText(preview.first);
|
||||||
if (preview.second) {
|
if (preview.second) {
|
||||||
if (conversation.isRead()) {
|
if (conversation.isRead()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user