Add account settings keybinds

This commit is contained in:
miruka 2019-11-10 08:54:45 -04:00
parent e32747d434
commit c0adf8353b
3 changed files with 25 additions and 6 deletions

View File

@ -132,6 +132,7 @@ class UISettings(JSONConfigFile):
"focusSidePane": ["Alt+S"], "focusSidePane": ["Alt+S"],
"clearRoomFilter": ["Alt+Shift+S"], "clearRoomFilter": ["Alt+Shift+S"],
"accountSettings": ["Alt+A"],
"addNewChat": ["Alt+N"], "addNewChat": ["Alt+N"],
"addNewAccount": ["Alt+Shift+N"], "addNewAccount": ["Alt+Shift+N"],

View File

@ -110,6 +110,21 @@ HShortcutHandler {
onPressed: mainUI.sidePane.sidePaneList.addNewChat() onPressed: mainUI.sidePane.sidePaneList.addNewChat()
} }
HShortcut {
enabled: mainUI.accountsPresent
sequences: settings.keys.accountSettings
onPressed: mainUI.sidePane.sidePaneList.accountSettings()
}
HShortcut {
enabled: mainUI.accountsPresent
sequences: settings.keys.toggleCollapseAccount
onPressed: mainUI.sidePane.sidePaneList.toggleCollapseAccount()
}
HShortcut { HShortcut {
enabled: mainUI.accountsPresent enabled: mainUI.accountsPresent
sequences: settings.keys.goToPreviousRoom sequences: settings.keys.goToPreviousRoom
@ -124,12 +139,6 @@ HShortcutHandler {
onHeld: pressed(event) onHeld: pressed(event)
} }
HShortcut {
enabled: mainUI.accountsPresent
sequences: settings.keys.toggleCollapseAccount
onPressed: mainUI.sidePane.sidePaneList.toggleCollapseAccount()
}
// Chat // Chat

View File

@ -72,6 +72,15 @@ HListView {
currentItem.item.activated() currentItem.item.activated()
} }
function accountSettings() {
if (! currentItem) incrementCurrentIndex()
pageLoader.showPage(
"EditAccount/EditAccount",
{userId: currentItem.item.delegateModel.user_id},
)
}
function addNewChat() { function addNewChat() {
if (! currentItem) incrementCurrentIndex() if (! currentItem) incrementCurrentIndex()