diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-02-15 21:58:57 +0200 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-02-15 21:58:57 +0200 |
commit | 86280098b49709fed6cc850f8ba28dac0b29c216 (patch) | |
tree | c308583ee8dee63f21984ff4ab4d165e350c8128 /src/timeline/TimelineViewManager.cc | |
parent | Simplify variant access with std::visit (diff) | |
download | nheko-86280098b49709fed6cc850f8ba28dac0b29c216.tar.xz |
Implement server-side notification count
Diffstat (limited to 'src/timeline/TimelineViewManager.cc')
-rw-r--r-- | src/timeline/TimelineViewManager.cc | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/timeline/TimelineViewManager.cc b/src/timeline/TimelineViewManager.cc index fdc3b9e2..7bee8869 100644 --- a/src/timeline/TimelineViewManager.cc +++ b/src/timeline/TimelineViewManager.cc @@ -159,10 +159,6 @@ TimelineViewManager::addRoom(const mtx::responses::JoinedRoom &room, const QStri &TimelineView::updateLastTimelineMessage, this, &TimelineViewManager::updateRoomsLastMessage); - connect(view, - &TimelineView::clearUnreadMessageCount, - this, - &TimelineViewManager::clearRoomMessageCount); // Add the view in the widget stack. addWidget(view); @@ -179,10 +175,6 @@ TimelineViewManager::addRoom(const QString &room_id) &TimelineView::updateLastTimelineMessage, this, &TimelineViewManager::updateRoomsLastMessage); - connect(view, - &TimelineView::clearUnreadMessageCount, - this, - &TimelineViewManager::clearRoomMessageCount); // Add the view in the widget stack. addWidget(view); @@ -201,16 +193,7 @@ TimelineViewManager::sync(const mtx::responses::Rooms &rooms) auto view = views_.at(roomid); - int msgs_added = view->addEvents(it->second.timeline); - - if (msgs_added > 0) { - // TODO: When the app window gets active the current - // unread count (if any) should be cleared. - auto isAppActive = QApplication::activeWindow() != nullptr; - - if (roomid != active_room_ || !isAppActive) - emit unreadMessages(roomid, msgs_added); - } + view->addEvents(it->second.timeline); } } |