summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorJedi18 <targetakhil@gmail.com>2021-02-16 00:47:17 +0530
committerJedi18 <targetakhil@gmail.com>2021-02-16 00:50:28 +0530
commit19dbbb2c6cffdf0697635f08acf3af9138aed7b9 (patch)
treeefdb6a1d7d776daec8cd8edb8d202a50f0da2935 /resources
parentAdd double tap to reply feature (diff)
downloadnheko-19dbbb2c6cffdf0697635f08acf3af9138aed7b9.tar.xz
add rooms model, add room delegate for completer
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/Completer.qml29
-rw-r--r--resources/qml/MessageInput.qml3
2 files changed, 32 insertions, 0 deletions
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 + } + + } + + } + } } diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml
index b5c96660..7ecaf81a 100644 --- a/resources/qml/MessageInput.qml +++ b/resources/qml/MessageInput.qml
@@ -183,6 +183,9 @@ Rectangle { } else if (event.key == Qt.Key_Colon) { messageInput.openCompleter(cursorPosition, "emoji"); popup.open(); + } else if (event.key == Qt.Key_NumberSign) { + messageInput.openCompleter(cursorPosition, "room"); + popup.open(); } else if (event.key == Qt.Key_Escape && popup.opened) { completerTriggeredAt = -1; popup.completerName = "";