Add keybinds to go to account at specific indice

This commit is contained in:
miruka
2020-05-14 02:48:48 -04:00
parent 6f1f82f82d
commit fd3fe06d15
3 changed files with 28 additions and 2 deletions

View File

@@ -69,7 +69,7 @@ HListView {
}
function goToAccountNumber(num) {
const index = Object.values(accountIndice).sort()[num]
const index = Object.entries(accountIndice).sort()[num][1]
model.get(index + 1).type === "Room" ?
currentIndex = index + 1 :
@@ -205,6 +205,16 @@ HListView {
onActivated: cycleUnreadRooms(true, true) && showItemLimiter.restart()
}
Repeater {
model: Object.keys(window.settings.keys.focusAccountAtIndex)
Item {
HShortcut {
sequence: window.settings.keys.focusAccountAtIndex[modelData]
onActivated: goToAccountNumber(parseInt(modelData - 1, 10))
}
}
}
Repeater {
model: Object.keys(window.settings.keys.focusRoomAtIndex)