Add keybinds to switch accounts

This commit is contained in:
miruka
2020-04-27 22:10:10 -04:00
parent 72c96b3ba5
commit 65103eaaba
6 changed files with 30 additions and 0 deletions

View File

@@ -15,6 +15,8 @@ HListView {
onActivated: showRoom(model.index)
}
onIsCurrentChanged: if (isCurrent) showRoom()
property var accountModel
property var roomPane
@@ -22,6 +24,8 @@ HListView {
function showRoom(index=currentIndex) {
if (index === -1) index = 0
if (index >= model.count) return
pageLoader.showRoom(accountModel.id, model.get(index).id)
currentIndex = index
}