summary refs log tree commit diff
path: root/src/timeline/TimelineModel.cpp
diff options
context:
space:
mode:
authorLoren Burkholder <computersemiexpert@outlook.com>2022-04-20 21:30:16 -0400
committerLoren Burkholder <computersemiexpert@outlook.com>2022-06-29 22:04:17 -0400
commite446e3d6792ff6a1664934b24e19fc80ffbbd22e (patch)
tree06efa0c032dc6148ef3163e2ea75c5def2920624 /src/timeline/TimelineModel.cpp
parentAdd space notifications to room list (diff)
downloadnheko-e446e3d6792ff6a1664934b24e19fc80ffbbd22e.tar.xz
Add loud notifications for spaces
Diffstat (limited to '')
-rw-r--r--src/timeline/TimelineModel.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp

index 308d358b..1a9f957b 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp
@@ -355,8 +355,9 @@ TimelineModel::TimelineModel(TimelineViewManager *manager, QString room_id, QObj auto roomInfo = cache::singleRoomInfo(room_id_.toStdString()); this->isSpace_ = roomInfo.is_space; this->notification_count = - isSpace_ ? utils::getChildNotificationsForSpace(room_id_) : roomInfo.notification_count; - this->highlight_count = roomInfo.highlight_count; + isSpace_ ? utils::getChildNotificationsForSpace(room_id_).first : roomInfo.notification_count; + this->highlight_count = + isSpace_ ? utils::getChildNotificationsForSpace(room_id_).second : roomInfo.highlight_count; lastMessage_.timestamp = roomInfo.approximate_last_modification_ts; // this connection will simplify adding the plainRoomNameChanged() signal everywhere that it @@ -365,7 +366,9 @@ TimelineModel::TimelineModel(TimelineViewManager *manager, QString room_id, QObj if (isSpace_) connect(ChatPage::instance(), &ChatPage::unreadMessages, this, [this](int) { - notification_count = utils::getChildNotificationsForSpace(room_id_); + auto temp{utils::getChildNotificationsForSpace(room_id_)}; + notification_count = temp.first; + highlight_count = temp.second; emit notificationsChanged(); });