summary refs log tree commit diff
path: root/include/ChatPage.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-05-07 12:00:49 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-05-07 12:00:49 +0300
commit5aff3e43098f1e730afe0202c737a93e90346c9b (patch)
treeb948f13fb1828d1f1e72c920656244f6806e3f65 /include/ChatPage.h
parentImplement desktop notification for mac (diff)
downloadnheko-5aff3e43098f1e730afe0202c737a93e90346c9b.tar.xz
Don't send notification for the room that is currently open
Diffstat (limited to 'include/ChatPage.h')
-rw-r--r--include/ChatPage.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/ChatPage.h b/include/ChatPage.h

index f659163c..6e0cf2d9 100644 --- a/include/ChatPage.h +++ b/include/ChatPage.h
@@ -117,6 +117,12 @@ private slots: private: static ChatPage *instance_; + //! Check if the given room is currently open. + bool isRoomActive(const QString &room_id) + { + return isActiveWindow() && currentRoom() == room_id; + } + using UserID = QString; using Membership = mtx::events::StateEvent<mtx::events::state::Member>; using Memberships = std::map<std::string, Membership>;