Fix notification count refresh for low-priority and mentions-only rooms

(cherry picked from commit 5f7967363f)
This commit is contained in:
Azhar Momin
2026-01-03 14:49:43 +05:30
committed by Joshua Goins
parent b3aa2abd89
commit e156d4da90
4 changed files with 30 additions and 20 deletions

View File

@@ -43,8 +43,8 @@ void SpaceHierarchyCache::cacheSpaceHierarchy()
Qt::SingleShotConnection);
}
connect(neoChatRoom, &NeoChatRoom::unreadStatsChanged, this, [this, neoChatRoom]() {
if (neoChatRoom != nullptr) {
connect(neoChatRoom, &NeoChatRoom::changed, this, [this, neoChatRoom](NeoChatRoom::Changes changes) {
if (neoChatRoom != nullptr && (changes & (NeoChatRoom::Change::UnreadStats | NeoChatRoom::Change::Highlights))) {
const auto parents = parentSpaces(neoChatRoom->id());
if (parents.count() > 0) {
Q_EMIT spaceNotifcationCountChanged(parents);