Fix unread message counter

This commit is contained in:
Benoit Martins 2024-09-09 09:42:18 +02:00
parent 89eb159a50
commit fa44e97232
2 changed files with 5 additions and 1 deletions

View file

@ -1146,7 +1146,7 @@ struct ContentView: View {
MagicSearchSingleton.shared.searchForContacts(sourceFlags: MagicSearch.Source.Friends.rawValue | MagicSearch.Source.LdapServers.rawValue)
}
.onReceive(pub) { _ in
conversationsListViewModel.refreshContactAvatarModel()
conversationsListViewModel.computeChatRoomsList(filter: "")
historyListViewModel.refreshHistoryAvatarModel()
}
}

View file

@ -90,6 +90,10 @@ class ConversationsListViewModel: ObservableObject {
}
})
self.mCoreSuscriptions.insert(core.publisher?.onChatRoomRead?.postOnCoreQueue { _ in
self.computeChatRoomsList(filter: "")
})
self.mCoreSuscriptions.insert(core.publisher?.onMessageSent?.postOnCoreQueue { _ in
self.computeChatRoomsList(filter: "")
})