diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp index cf44ae00..04523578 100644 --- a/src/ChatPage.cpp +++ b/src/ChatPage.cpp @@ -144,9 +144,13 @@ ChatPage::ChatPage(QSharedPointer userSettings, QObject *parent) Q_UNUSED(eventid) auto exWin = MainWindow::instance()->windowForRoom(roomid); if (exWin) { + exWin->setVisible(true); + exWin->raise(); exWin->requestActivate(); } else { view_manager_->rooms()->setCurrentRoom(roomid); + MainWindow::instance()->setVisible(true); + MainWindow::instance()->raise(); MainWindow::instance()->requestActivate(); } }); @@ -1621,9 +1625,13 @@ ChatPage::sendNotificationReply(const QString &roomid, const QString &eventid, c view_manager_->queueReply(roomid, eventid, body); auto exWin = MainWindow::instance()->windowForRoom(roomid); if (exWin) { + exWin->setVisible(true); + exWin->raise(); exWin->requestActivate(); } else { view_manager_->rooms()->setCurrentRoom(roomid); + MainWindow::instance()->setVisible(true); + MainWindow::instance()->raise(); MainWindow::instance()->requestActivate(); } } diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp index 5d08e05e..0d5f788b 100644 --- a/src/timeline/TimelineViewManager.cpp +++ b/src/timeline/TimelineViewManager.cpp @@ -233,9 +233,13 @@ TimelineViewManager::showEvent(const QString &room_id, const QString &event_id) if (auto room = rooms_->getRoomById(room_id)) { auto exWin = MainWindow::instance()->windowForRoom(room_id); if (exWin) { + exWin->setVisible(true); + exWin->raise(); exWin->requestActivate(); - } else if (rooms_->currentRoom() != room) { + } else { rooms_->setCurrentRoom(room_id); + MainWindow::instance()->setVisible(true); + MainWindow::instance()->raise(); MainWindow::instance()->requestActivate(); nhlog::ui()->info("Activated room {}", room_id.toStdString()); }