diff --git a/src/app/modules/main/chat_section/module.nim b/src/app/modules/main/chat_section/module.nim index 692813bae4..5a09832d44 100644 --- a/src/app/modules/main/chat_section/module.nim +++ b/src/app/modules/main/chat_section/module.nim @@ -554,7 +554,7 @@ method addNewChat*( setChatAsActive: bool = true, insertIntoModel: bool = true, ): Item = - let hasNotification = not chatDto.muted and (chatDto.unviewedMessagesCount > 0 or chatDto.unviewedMentionsCount > 0) + let hasNotification =chatDto.unviewedMessagesCount > 0 let notificationsCount = chatDto.unviewedMentionsCount var chatName = chatDto.name @@ -1198,10 +1198,7 @@ proc addOrUpdateChat(self: Module, if not self.chatsLoaded or chatExists: # Update badges - var hasUnreadMessages = false - if not chat.muted: - hasUnreadMessages = chat.unviewedMessagesCount > 0 - self.updateBadgeNotifications(chat, hasUnreadMessages, chat.unviewedMentionsCount) + self.updateBadgeNotifications(chat, chat.unviewedMessagesCount > 0, chat.unviewedMentionsCount) if not self.chatsLoaded: return diff --git a/src/app_service/service/chat/service.nim b/src/app_service/service/chat/service.nim index 467ec9080d..4f1931f97b 100644 --- a/src/app_service/service/chat/service.nim +++ b/src/app_service/service/chat/service.nim @@ -279,7 +279,8 @@ QtObject: for chat in self.channelGroups[communityId].chats: result.unviewedMentionsCount += chat.unviewedMentionsCount - if chat.muted: + # We count the unread messages if we are unmuted and it's not a mention, we want to show a badge on mentions + if chat.unviewedMentionsCount == 0 and chat.muted: continue if chat.unviewedMessagesCount > 0: result.unviewedMessagesCount = result.unviewedMessagesCount + chat.unviewedMessagesCount diff --git a/ui/StatusQ/src/StatusQ/Components/StatusChatListItem.qml b/ui/StatusQ/src/StatusQ/Components/StatusChatListItem.qml index 871cb0d01e..d3303ab0ce 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusChatListItem.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusChatListItem.qml @@ -200,7 +200,7 @@ Rectangle { anchors.rightMargin: 8 StatusBadge { id: statusBadge - readonly property bool onlyUnread: (root.notificationsCount === 0 && root.hasUnreadMessages) + readonly property bool onlyUnread: !root.muted && root.notificationsCount === 0 && root.hasUnreadMessages anchors.centerIn: parent color: onlyUnread ? Theme.palette.baseColor1 : root.muted ? Theme.palette.primaryColor2 : Theme.palette.primaryColor1 diff --git a/vendor/status-go b/vendor/status-go index 60b160997c..a46bf97bf3 160000 --- a/vendor/status-go +++ b/vendor/status-go @@ -1 +1 @@ -Subproject commit 60b160997c7f583c2f1e0ebbe5b995ca117e86f3 +Subproject commit a46bf97bf3f46b07d1f447732947011e20fa499f