Add next/prev room shortcuts
This commit is contained in:
parent
735086371d
commit
558fd10f7b
3 changed files with 80 additions and 0 deletions
|
|
@ -18,6 +18,7 @@
|
|||
#include <QApplication>
|
||||
#include <QImageReader>
|
||||
#include <QSettings>
|
||||
#include <QShortcut>
|
||||
#include <QtConcurrent>
|
||||
|
||||
#include "AvatarProvider.h"
|
||||
|
|
@ -148,6 +149,17 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent)
|
|||
trySync();
|
||||
});
|
||||
|
||||
connect(
|
||||
new QShortcut(QKeySequence("Ctrl+Down"), this), &QShortcut::activated, this, [this]() {
|
||||
if (isVisible())
|
||||
room_list_->nextRoom();
|
||||
});
|
||||
connect(
|
||||
new QShortcut(QKeySequence("Ctrl+Up"), this), &QShortcut::activated, this, [this]() {
|
||||
if (isVisible())
|
||||
room_list_->previousRoom();
|
||||
});
|
||||
|
||||
connect(top_bar_, &TopRoomBar::mentionsClicked, this, [this](const QPoint &mentionsPos) {
|
||||
if (user_mentions_popup_->isVisible()) {
|
||||
user_mentions_popup_->hide();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue