Files
neochat/src/qml/ChooseRoomDialog.qml
Tobias Fella fc4cb31277 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
2024-12-03 10:07:11 +01:00

34 lines
691 B
QML

// SPDX-FileCopyrightText: 2023 Tobias Fella <tobias.fella@kde.org>
// SPDX-License-Identifier: GPL-2.0-or-later
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Controls
import org.kde.kirigami as Kirigami
import org.kde.neochat
SearchPage {
id: root
title: i18nc("@title", "Choose a Room")
showSearchButton: false
signal chosen(string roomId)
required property NeoChatConnection connection
model: RoomManager.sortFilterRoomListModel
modelDelegate: RoomDelegate {
onClicked: {
root.chosen(currentRoom.id);
root.closeDialog();
}
connection: root.connection
openOnClick: false
}
}