diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index fb4b656d4..b69f673f1 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -2685,9 +2685,9 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke conversation.populateWithMessages(ConversationFragment.this.messageList); updateSnackBar(conversation); updateStatusMessages(); - if (conversation.getReceivedMessagesCountSinceUuid(lastMessageUuid) != 0) { + if (conversation.unreadCount() > 0) { binding.unreadCountCustomView.setVisibility(View.VISIBLE); - binding.unreadCountCustomView.setUnreadCount(conversation.getReceivedMessagesCountSinceUuid(lastMessageUuid)); + binding.unreadCountCustomView.setUnreadCount(conversation.unreadCount()); } this.messageListAdapter.notifyDataSetChanged(); updateChatMsgHint();