mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
parent
673ca9d6a3
commit
7734c4735a
2 changed files with 13 additions and 1 deletions
|
@ -144,9 +144,13 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QObject *parent)
|
||||||
Q_UNUSED(eventid)
|
Q_UNUSED(eventid)
|
||||||
auto exWin = MainWindow::instance()->windowForRoom(roomid);
|
auto exWin = MainWindow::instance()->windowForRoom(roomid);
|
||||||
if (exWin) {
|
if (exWin) {
|
||||||
|
exWin->setVisible(true);
|
||||||
|
exWin->raise();
|
||||||
exWin->requestActivate();
|
exWin->requestActivate();
|
||||||
} else {
|
} else {
|
||||||
view_manager_->rooms()->setCurrentRoom(roomid);
|
view_manager_->rooms()->setCurrentRoom(roomid);
|
||||||
|
MainWindow::instance()->setVisible(true);
|
||||||
|
MainWindow::instance()->raise();
|
||||||
MainWindow::instance()->requestActivate();
|
MainWindow::instance()->requestActivate();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1621,9 +1625,13 @@ ChatPage::sendNotificationReply(const QString &roomid, const QString &eventid, c
|
||||||
view_manager_->queueReply(roomid, eventid, body);
|
view_manager_->queueReply(roomid, eventid, body);
|
||||||
auto exWin = MainWindow::instance()->windowForRoom(roomid);
|
auto exWin = MainWindow::instance()->windowForRoom(roomid);
|
||||||
if (exWin) {
|
if (exWin) {
|
||||||
|
exWin->setVisible(true);
|
||||||
|
exWin->raise();
|
||||||
exWin->requestActivate();
|
exWin->requestActivate();
|
||||||
} else {
|
} else {
|
||||||
view_manager_->rooms()->setCurrentRoom(roomid);
|
view_manager_->rooms()->setCurrentRoom(roomid);
|
||||||
|
MainWindow::instance()->setVisible(true);
|
||||||
|
MainWindow::instance()->raise();
|
||||||
MainWindow::instance()->requestActivate();
|
MainWindow::instance()->requestActivate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -233,9 +233,13 @@ TimelineViewManager::showEvent(const QString &room_id, const QString &event_id)
|
||||||
if (auto room = rooms_->getRoomById(room_id)) {
|
if (auto room = rooms_->getRoomById(room_id)) {
|
||||||
auto exWin = MainWindow::instance()->windowForRoom(room_id);
|
auto exWin = MainWindow::instance()->windowForRoom(room_id);
|
||||||
if (exWin) {
|
if (exWin) {
|
||||||
|
exWin->setVisible(true);
|
||||||
|
exWin->raise();
|
||||||
exWin->requestActivate();
|
exWin->requestActivate();
|
||||||
} else if (rooms_->currentRoom() != room) {
|
} else {
|
||||||
rooms_->setCurrentRoom(room_id);
|
rooms_->setCurrentRoom(room_id);
|
||||||
|
MainWindow::instance()->setVisible(true);
|
||||||
|
MainWindow::instance()->raise();
|
||||||
MainWindow::instance()->requestActivate();
|
MainWindow::instance()->requestActivate();
|
||||||
nhlog::ui()->info("Activated room {}", room_id.toStdString());
|
nhlog::ui()->info("Activated room {}", room_id.toStdString());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue