Use Instantiator for RoomList AtIndex keybinds
Instantiator is better suited to the task: Repeater is specially made to load visual components, and that forced us to wrap the HShortcuts inside empty Items.
This commit is contained in:
parent
66169e641e
commit
806983db93
|
@ -269,25 +269,19 @@ HListView {
|
|||
onActivated: cycleUnreadRooms(true, true) && showItemLimiter.restart()
|
||||
}
|
||||
|
||||
Repeater {
|
||||
Instantiator {
|
||||
model: Object.keys(window.settings.Keys.Accounts.AtIndex)
|
||||
|
||||
Item {
|
||||
HShortcut {
|
||||
delegate: HShortcut {
|
||||
sequences: window.settings.Keys.Accounts.AtIndex[modelData]
|
||||
onActivated: goToAccountNumber(parseInt(modelData, 10) - 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Repeater {
|
||||
Instantiator {
|
||||
model: Object.keys(window.settings.Keys.Rooms.AtIndex)
|
||||
|
||||
Item {
|
||||
HShortcut {
|
||||
delegate: HShortcut {
|
||||
sequences: window.settings.Keys.Rooms.AtIndex[modelData]
|
||||
onActivated: showAccountRoomAtIndex(parseInt(modelData,10) - 1)
|
||||
}
|
||||
onActivated: showAccountRoomAtIndex(parseInt(modelData, 10) - 1)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user