Move remaining code to app module
There's still some stuff that could potentially go elsewhere but I think it's enough for now.
This commit is contained in:
33
src/app/qml/ChooseRoomDialog.qml
Normal file
33
src/app/qml/ChooseRoomDialog.qml
Normal file
@@ -0,0 +1,33 @@
|
||||
// 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user