Add ability to respond to notifications on macOS
This commit is contained in:
parent
9138119dc4
commit
07e8f64903
11 changed files with 307 additions and 99 deletions
|
|
@ -152,16 +152,7 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QObject *parent)
|
|||
connect(notificationsManager,
|
||||
&NotificationsManager::sendNotificationReply,
|
||||
this,
|
||||
[this](const QString &roomid, const QString &eventid, const QString &body) {
|
||||
view_manager_->queueReply(roomid, eventid, body);
|
||||
auto exWin = MainWindow::instance()->windowForRoom(roomid);
|
||||
if (exWin) {
|
||||
exWin->requestActivate();
|
||||
} else {
|
||||
view_manager_->rooms()->setCurrentRoom(roomid);
|
||||
MainWindow::instance()->requestActivate();
|
||||
}
|
||||
});
|
||||
&ChatPage::sendNotificationReply);
|
||||
|
||||
connect(
|
||||
this,
|
||||
|
|
@ -1583,6 +1574,19 @@ ChatPage::handleMatrixUri(QString uri)
|
|||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
ChatPage::sendNotificationReply(const QString &roomid, const QString &eventid, const QString &body)
|
||||
{
|
||||
view_manager_->queueReply(roomid, eventid, body);
|
||||
auto exWin = MainWindow::instance()->windowForRoom(roomid);
|
||||
if (exWin) {
|
||||
exWin->requestActivate();
|
||||
} else {
|
||||
view_manager_->rooms()->setCurrentRoom(roomid);
|
||||
MainWindow::instance()->requestActivate();
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
ChatPage::handleMatrixUri(const QUrl &uri)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue