Fix notification count refresh for low-priority and mentions-only rooms
(cherry picked from commit 5f7967363f)
This commit is contained in:
committed by
Joshua Goins
parent
b3aa2abd89
commit
e156d4da90
@@ -170,10 +170,12 @@ void RoomTreeModel::connectRoomSignals(NeoChatRoom *room)
|
||||
connect(room, &Room::displaynameChanged, this, [this, room] {
|
||||
refreshRoomRoles(room, {DisplayNameRole});
|
||||
});
|
||||
connect(room, &Room::unreadStatsChanged, this, [this, room] {
|
||||
refreshRoomRoles(room, {ContextNotificationCountRole, HasHighlightNotificationsRole, NotificationCountRole});
|
||||
if (room->isServerNoticeRoom()) {
|
||||
Q_EMIT invalidateSort();
|
||||
connect(room, &Room::changed, this, [this, room](Room::Changes changes) {
|
||||
if (changes & (Room::Change::UnreadStats | Room::Change::Highlights)) {
|
||||
refreshRoomRoles(room, {ContextNotificationCountRole, HasHighlightNotificationsRole, NotificationCountRole});
|
||||
if (room->isServerNoticeRoom()) {
|
||||
Q_EMIT invalidateSort();
|
||||
}
|
||||
}
|
||||
});
|
||||
connect(room, &Room::avatarChanged, this, [this, room] {
|
||||
|
||||
Reference in New Issue
Block a user