Devtools: Use ChooseRoomDialog to select a room for inspection
The combobox has several drawbacks: - It's not sorted in any meaningful way - It doesn't have a search - It doesn't show the icon and last message This makes it hard to find the intended room in that dialog. The ChooseRoomDialog provides these things for us
This commit is contained in:
@@ -23,7 +23,11 @@ SearchPage {
|
||||
|
||||
model: RoomManager.sortFilterRoomListModel
|
||||
modelDelegate: RoomDelegate {
|
||||
onClicked: root.chosen(currentRoom.id)
|
||||
onClicked: {
|
||||
root.chosen(currentRoom.id);
|
||||
root.closeDialog();
|
||||
}
|
||||
connection: root.connection
|
||||
openOnClick: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ Delegates.RoundedItemDelegate {
|
||||
required property string subtitleText
|
||||
required property string displayName
|
||||
|
||||
property bool openOnClick: true
|
||||
property bool showConfigure: true
|
||||
|
||||
property bool collapsed: false
|
||||
@@ -35,8 +36,10 @@ Delegates.RoundedItemDelegate {
|
||||
Accessible.onPressAction: clicked()
|
||||
|
||||
onClicked: {
|
||||
RoomManager.resolveResource(currentRoom.id);
|
||||
pageStack.currentIndex = 1;
|
||||
if (root.openOnClick) {
|
||||
RoomManager.resolveResource(currentRoom.id);
|
||||
pageStack.currentIndex = 1;
|
||||
}
|
||||
}
|
||||
|
||||
onPressAndHold: createRoomListContextMenu()
|
||||
|
||||
Reference in New Issue
Block a user