summary refs log tree commit diff
path: root/src/timeline/RoomlistModel.cpp
diff options
context:
space:
mode:
authorLoren Burkholder <computersemiexpert@outlook.com>2022-04-19 23:18:11 -0400
committerLoren Burkholder <computersemiexpert@outlook.com>2022-06-29 22:02:20 -0400
commit169384f0fa41cc8a52428f27bc3042dc849dd8c9 (patch)
tree048b76aaeec2760c8edd403821a8cf61f542a729 /src/timeline/RoomlistModel.cpp
parentFix typoed variable name (diff)
downloadnheko-169384f0fa41cc8a52428f27bc3042dc849dd8c9.tar.xz
Add space notifications to room list
Diffstat (limited to 'src/timeline/RoomlistModel.cpp')
-rw-r--r--src/timeline/RoomlistModel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/timeline/RoomlistModel.cpp b/src/timeline/RoomlistModel.cpp
index 1cf16243..3b46c053 100644
--- a/src/timeline/RoomlistModel.cpp
+++ b/src/timeline/RoomlistModel.cpp
@@ -330,10 +330,13 @@ RoomlistModel::addRoom(const QString &room_id, bool suppressInsertNotification)
                                Qt::DisplayRole,
                              });
 
+            if (getRoomById(room_id)->isSpace())
+                return; // no need to update space notifications
+
             int total_unread_msgs = 0;
 
             for (const auto &room : qAsConst(models)) {
-                if (!room.isNull())
+                if (!room.isNull() && !room->isSpace())
                     total_unread_msgs += room->notificationCount();
             }