Add leaveRoom and forgetRoom keybinds

This commit is contained in:
miruka 2020-03-28 12:50:09 -04:00
parent 2a648d7f59
commit 6e63569ad7
2 changed files with 20 additions and 0 deletions

View File

@ -288,6 +288,8 @@ class UISettings(JSONDataFile):
"sendFile": ["Alt+S"],
"sendFileFromPathInClipboard": ["Alt+Shift+S"],
"inviteToRoom": ["Alt+I"],
"leaveRoom": ["Alt+Escape"],
"forgetRoom": ["Alt+Shift+Escape"],
"toggleFocusRoomPane": ["Alt+R"],
},

View File

@ -26,6 +26,24 @@ Item {
readonly property alias roomPane: roomPaneLoader.item
HShortcut {
sequences: window.settings.keys.leaveRoom
onActivated: utils.makePopup(
"Popups/LeaveRoomPopup.qml",
chat,
{userId, roomId, roomName: roomInfo.display_name},
)
}
HShortcut {
sequences: window.settings.keys.forgetRoom
onActivated: utils.makePopup(
"Popups/ForgetRoomPopup.qml",
chat,
{userId, roomId, roomName: roomInfo.display_name},
)
}
Timer {
interval: 100
running: ! userInfo