parent
f7e8b68715
commit
a694b15d6c
|
@ -350,7 +350,8 @@ proc updateNotifications(self: Module, chatId: string, unviewedMessagesCount: in
|
|||
# update model of this module (appropriate chat from the chats list (chats model))
|
||||
self.view.chatsModel().updateNotificationsForItemOrSubItemById(chatId, hasUnreadMessages, unviewedMentionsCount)
|
||||
# update child module
|
||||
self.chatContentModules[chatId].onNotificationsUpdated(hasUnreadMessages, unviewedMentionsCount)
|
||||
if (self.chatContentModules.contains(chatId)):
|
||||
self.chatContentModules[chatId].onNotificationsUpdated(hasUnreadMessages, unviewedMentionsCount)
|
||||
# update parent module
|
||||
let (sectionHasUnreadMessages, sectionNotificationCount) = self.view.chatsModel().getAllNotifications()
|
||||
self.delegate.onNotificationsUpdated(self.controller.getMySectionId(), sectionHasUnreadMessages, sectionNotificationCount)
|
||||
|
@ -420,4 +421,4 @@ method onNewMessagesReceived*(self: Module, chatId: string, unviewedMessagesCoun
|
|||
if(activeChatId == chatId):
|
||||
self.controller.markAllMessagesRead(chatId)
|
||||
else:
|
||||
self.updateNotifications(chatId, unviewedMessagesCount, unviewedMentionsCount)
|
||||
self.updateNotifications(chatId, unviewedMessagesCount, unviewedMentionsCount)
|
||||
|
|
Loading…
Reference in New Issue