Add Alt+1-0 keybinds to switch to a room at index
This commit is contained in:
@@ -211,6 +211,20 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Repeater {
|
||||
model: Object.keys(settings.keys.focusRoomAtIndex)
|
||||
|
||||
Item {
|
||||
HShortcut {
|
||||
enabled: mainUI.accountsPresent
|
||||
sequence: settings.keys.focusRoomAtIndex[modelData]
|
||||
onActivated: mainUI.mainPane.mainPaneList.goToRoom(
|
||||
parseInt(modelData - 1, 10),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Chat
|
||||
|
||||
|
@@ -182,6 +182,12 @@ HListView {
|
||||
}
|
||||
}
|
||||
|
||||
function goToRoom(index) {
|
||||
if (! currentItem) next()
|
||||
const room = currentItem.roomList.contentItem.children[index]
|
||||
if (room && room.activated) room.activated()
|
||||
}
|
||||
|
||||
function requestActivate() {
|
||||
activateLimiter.restart()
|
||||
}
|
||||
|
Reference in New Issue
Block a user