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:
Tobias Fella
2024-12-02 20:27:06 +01:00
parent 9876636dbc
commit fc4cb31277
3 changed files with 24 additions and 14 deletions

View File

@@ -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
}
}

View File

@@ -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()