fix(@desktop/chat): Fix activity center icon badge displaying

Fix #5739
This commit is contained in:
Michal Iskierko 2022-05-19 14:33:17 +02:00 committed by Iuri Matias
parent 8974d0a4df
commit 80cead9d6d
3 changed files with 4 additions and 6 deletions

View File

@ -184,6 +184,7 @@ QtObject:
if (addToCount and not activityCenterNotification.read):
self.nbUnreadNotifications = self.nbUnreadNotifications + 1
self.unreadCountChanged()
proc updateUnreadCount*(self: Model, count: int) =
self.nbUnreadNotifications = count

View File

@ -28,6 +28,8 @@ Popup {
property var chatSectionModule
property var messageContextMenu
readonly property int unreadNotificationsCount : activityCenter.store.activityCenterList.unreadCount
id: activityCenter
modal: false

View File

@ -158,12 +158,7 @@ ColumnLayout {
notificationButton.visible: localAccountSensitiveSettings.isActivityCenterEnabled
notificationButton.tooltip.offset: localAccountSensitiveSettings.expandUsersList && membersButton.visible ? 0 : 14
notificationCount: {
if(!chatContentModule)
return 0
return chatContentModule.chatDetails.notificationCount
}
notificationCount: activityCenter.unreadNotificationsCount
onSearchButtonClicked: root.openAppSearch()