Disable SidePane shortcuts when no account present

This commit is contained in:
miruka 2019-08-23 11:06:19 -04:00
parent 7eda87217c
commit 8ebd7189cc

View File

@ -35,33 +35,39 @@ HShortcutHandler {
// SidePane
HShortcut {
enabled: mainUI.accountsPresent
sequences: settings.keys.focusSidePane
onPressed: mainUI.sidePane.setFocus()
}
HShortcut {
enabled: mainUI.accountsPresent
sequences: settings.keys.clearRoomFilter
onPressed: mainUI.sidePane.paneToolBar.roomFilter = ""
}
HShortcut {
enabled: mainUI.accountsPresent
sequences: settings.keys.addNewAccount
onPressed: mainUI.sidePane.paneToolBar.addAccountButton.clicked()
}
HShortcut {
enabled: mainUI.accountsPresent
sequences: settings.keys.goToPreviousRoom
onPressed: mainUI.sidePane.accountRoomList.previous()
onHeld: pressed(event)
}
HShortcut {
enabled: mainUI.accountsPresent
sequences: settings.keys.goToNextRoom
onPressed: mainUI.sidePane.accountRoomList.next()
onHeld: pressed(event)
}
HShortcut {
enabled: mainUI.accountsPresent
sequences: settings.keys.toggleCollapseAccount
onPressed: mainUI.sidePane.accountRoomList.toggleCollapseAccount()
}