From 86280098b49709fed6cc850f8ba28dac0b29c216 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Thu, 15 Feb 2018 21:58:57 +0200 Subject: Implement server-side notification count --- src/timeline/TimelineViewManager.cc | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'src/timeline/TimelineViewManager.cc') 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); } } -- cgit 1.5.1