|
|
|
@ -90,13 +90,13 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent) |
|
|
|
|
connect(sidebarActions_, &SideBarActions::joinRoom, this, &ChatPage::joinRoom); |
|
|
|
|
connect(sidebarActions_, &SideBarActions::createRoom, this, &ChatPage::createRoom); |
|
|
|
|
|
|
|
|
|
user_info_widget_ = new UserInfoWidget(sideBar_); |
|
|
|
|
//user_mentions_widget_ = new UserMentionsWidget(sideBar_);
|
|
|
|
|
room_list_ = new RoomList(sideBar_); |
|
|
|
|
user_info_widget_ = new UserInfoWidget(sideBar_); |
|
|
|
|
// user_mentions_widget_ = new UserMentionsWidget(sideBar_);
|
|
|
|
|
room_list_ = new RoomList(sideBar_); |
|
|
|
|
connect(room_list_, &RoomList::joinRoom, this, &ChatPage::joinRoom); |
|
|
|
|
|
|
|
|
|
sideBarLayout_->addWidget(user_info_widget_); |
|
|
|
|
//sideBarLayout_->addWidget(user_mentions_widget_);
|
|
|
|
|
// sideBarLayout_->addWidget(user_mentions_widget_);
|
|
|
|
|
sideBarLayout_->addWidget(room_list_); |
|
|
|
|
sideBarLayout_->addWidget(sidebarActions_); |
|
|
|
|
|
|
|
|
@ -159,7 +159,8 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent) |
|
|
|
|
1000, |
|
|
|
|
"", |
|
|
|
|
"highlight", |
|
|
|
|
[this, mentionsPos](const mtx::responses::Notifications &res, mtx::http::RequestErr err) { |
|
|
|
|
[this, mentionsPos](const mtx::responses::Notifications &res, |
|
|
|
|
mtx::http::RequestErr err) { |
|
|
|
|
if (err) { |
|
|
|
|
nhlog::net()->warn("failed to retrieve notifications: {} ({})", |
|
|
|
|
err->matrix_error.error, |
|
|
|
@ -218,8 +219,6 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
connect(room_list_, &RoomList::roomChanged, this, [this](const QString &roomid) { |
|
|
|
|
QStringList users; |
|
|
|
|
|
|
|
|
@ -1007,10 +1006,11 @@ ChatPage::showNotificationsDialog(const mtx::responses::Notifications &res, cons |
|
|
|
|
nhlog::db()->warn("error while sending desktop notification: {}", e.what()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
notifDialog->setGeometry(widgetPos.x() - (width() / 10), widgetPos.y() + 25, width() / 5, height() / 2);
|
|
|
|
|
//notifDialog->move(widgetPos.x(), widgetPos.y());
|
|
|
|
|
//notifDialog->setFixedWidth(width() / 10);
|
|
|
|
|
//notifDialog->setFixedHeight(height() / 2);
|
|
|
|
|
notifDialog->setGeometry( |
|
|
|
|
widgetPos.x() - (width() / 10), widgetPos.y() + 25, width() / 5, height() / 2); |
|
|
|
|
// notifDialog->move(widgetPos.x(), widgetPos.y());
|
|
|
|
|
// notifDialog->setFixedWidth(width() / 10);
|
|
|
|
|
// notifDialog->setFixedHeight(height() / 2);
|
|
|
|
|
notifDialog->raise(); |
|
|
|
|
notifDialog->show(); |
|
|
|
|
} |
|
|
|
|