From 010debe3e4ebeff694ede05e1dab0235286a9db7 Mon Sep 17 00:00:00 2001 From: pcworld <0188801@gmail.com> Date: Sat, 29 May 2021 00:20:52 +0200 Subject: Fix notifications in narrow view when content is hidden In narrow view, a room can be selected even if the view currently only shows the room list and the timeline is hidden. This commit ensures that in this case, notifications are not suppressed. --- src/ChatPage.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ChatPage.cpp') diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp index c5199ff1..1a1c1044 100644 --- a/src/ChatPage.cpp +++ b/src/ChatPage.cpp @@ -1197,6 +1197,12 @@ ChatPage::getProfileInfo() }); } +bool +ChatPage::isRoomActive(const QString &room_id) +{ + return isActiveWindow() && content_->isVisible() && currentRoom() == room_id; +} + void ChatPage::hideSideBars() { -- cgit 1.5.1