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:
		@@ -269,25 +269,19 @@ HListView {
 | 
				
			|||||||
        onActivated: cycleUnreadRooms(true, true) && showItemLimiter.restart()
 | 
					        onActivated: cycleUnreadRooms(true, true) && showItemLimiter.restart()
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Repeater {
 | 
					    Instantiator {
 | 
				
			||||||
        model: Object.keys(window.settings.Keys.Accounts.AtIndex)
 | 
					        model: Object.keys(window.settings.Keys.Accounts.AtIndex)
 | 
				
			||||||
 | 
					        delegate: HShortcut {
 | 
				
			||||||
        Item {
 | 
					            sequences: window.settings.Keys.Accounts.AtIndex[modelData]
 | 
				
			||||||
            HShortcut {
 | 
					            onActivated: goToAccountNumber(parseInt(modelData, 10) - 1)
 | 
				
			||||||
                sequences: window.settings.Keys.Accounts.AtIndex[modelData]
 | 
					 | 
				
			||||||
                onActivated: goToAccountNumber(parseInt(modelData, 10) - 1)
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Repeater {
 | 
					    Instantiator {
 | 
				
			||||||
        model: Object.keys(window.settings.Keys.Rooms.AtIndex)
 | 
					        model: Object.keys(window.settings.Keys.Rooms.AtIndex)
 | 
				
			||||||
 | 
					        delegate: HShortcut {
 | 
				
			||||||
        Item {
 | 
					            sequences: window.settings.Keys.Rooms.AtIndex[modelData]
 | 
				
			||||||
            HShortcut {
 | 
					            onActivated: showAccountRoomAtIndex(parseInt(modelData, 10) - 1)
 | 
				
			||||||
                sequences: window.settings.Keys.Rooms.AtIndex[modelData]
 | 
					 | 
				
			||||||
                onActivated: showAccountRoomAtIndex(parseInt(modelData,10) - 1)
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user