Remove duplicated code in QuickSwitcher for RoomDelegate
This commit is contained in:
@@ -240,6 +240,15 @@ Kirigami.Page {
|
||||
|
||||
RoomList.RoomDelegate {
|
||||
filterText: sortFilterRoomListModel.filterText
|
||||
|
||||
height: visible ? implicitHeight : 0
|
||||
|
||||
visible: categoryVisible || filterText.length > 0 || Config.mergeRoomList
|
||||
|
||||
onClicked: RoomManager.enterRoom(currentRoom)
|
||||
|
||||
Keys.onEnterPressed: RoomManager.enterRoom(currentRoom)
|
||||
Keys.onReturnPressed: RoomManager.enterRoom(currentRoom)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,16 +30,8 @@ Delegates.RoundedItemDelegate {
|
||||
|
||||
readonly property bool hasNotifications: notificationCount > 0
|
||||
|
||||
height: visible ? implicitHeight : 0
|
||||
|
||||
visible: root.categoryVisible || root.filterText.length > 0 || Config.mergeRoomList
|
||||
|
||||
onClicked: RoomManager.enterRoom(root.currentRoom)
|
||||
onPressAndHold: createRoomListContextMenu()
|
||||
|
||||
Keys.onEnterPressed: RoomManager.enterRoom(root.currentRoom)
|
||||
Keys.onReturnPressed: RoomManager.enterRoom(root.currentRoom)
|
||||
|
||||
TapHandler {
|
||||
acceptedButtons: Qt.RightButton
|
||||
acceptedDevices: PointerDevice.Mouse
|
||||
|
||||
Reference in New Issue
Block a user