Use more adapted delegate for showing emote (/me)

Now use a standard MessageDelegate and don't display the title part.
This now make the reply and reaction button available and also make it
possible to see the reactions.

Fix: #69
Fix: #75
This commit is contained in:
Carl Schwan
2020-11-27 15:29:11 +01:00
parent c1dccf7a7e
commit 550cef52d0
4 changed files with 47 additions and 24 deletions

View File

@@ -22,27 +22,29 @@ Kirigami.ScrollablePage {
title: i18n("Start a Chat")
header: RowLayout {
Layout.fillWidth: true
Kirigami.SearchField {
id: identifierField
header: Control {
padding: Kirigami.Units.largeSpacing
contentItem: RowLayout {
Kirigami.SearchField {
id: identifierField
property bool isUserID: text.match(/@(.+):(.+)/g)
property bool isUserID: text.match(/@(.+):(.+)/g)
Layout.fillWidth: true
Layout.fillWidth: true
placeholderText: i18n("Find a user...")
placeholderText: i18n("Find a user...")
onAccepted: userDictListModel.search()
}
onAccepted: userDictListModel.search()
}
Button {
visible: identifierField.isUserID
Button {
visible: identifierField.isUserID
text: i18n("Chat")
highlighted: true
text: i18n("Chat")
highlighted: true
onClicked: Controller.createDirectChat(connection, identifierField.text)
onClicked: Controller.createDirectChat(connection, identifierField.text)
}
}
}