From 19dbbb2c6cffdf0697635f08acf3af9138aed7b9 Mon Sep 17 00:00:00 2001 From: Jedi18 Date: Tue, 16 Feb 2021 00:47:17 +0530 Subject: add rooms model, add room delegate for completer --- resources/qml/Completer.qml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'resources/qml/Completer.qml') diff --git a/resources/qml/Completer.qml b/resources/qml/Completer.qml index 27322172..f77f50e9 100644 --- a/resources/qml/Completer.qml +++ b/resources/qml/Completer.qml @@ -154,6 +154,35 @@ Popup { } + DelegateChoice { + roleValue: "room" + + RowLayout { + id: del + + anchors.centerIn: parent + + Avatar { + height: 24 + width: 24 + url: model.avatarUrl.replace("mxc://", "image://MxcImage/") + onClicked: popup.completionClicked(completer.completionAt(model.index)) + } + + Label { + text: model.roomName + color: model.index == popup.currentIndex ? colors.highlightedText : colors.text + } + + Label { + text: "(" + model.roomAlias + ")" + color: model.index == popup.currentIndex ? colors.highlightedText : colors.buttonText + } + + } + + } + } } -- cgit 1.5.1