Handle emotes in texthander

This moves the code to add the emote user pill into texthandler removing the now redundant checks from the message delegates.
This commit is contained in:
James Graham
2023-04-07 19:03:04 +00:00
parent abd56baa51
commit be3b5cdb8a
6 changed files with 51 additions and 10 deletions

View File

@@ -13,7 +13,6 @@ import org.kde.neochat 1.0
TimelineContainer {
id: messageDelegate
property bool isEmote: false
onOpenContextMenu: openMessageContext(model, label.selectedText, Controller.plainText(label.textDocument))
innerObject: ColumnLayout {
@@ -22,7 +21,6 @@ TimelineContainer {
id: label
Layout.fillWidth: true
visible: currentRoom.chatBoxEditId !== model.eventId
isEmote: messageDelegate.isEmote
}
Loader {
Layout.fillWidth: true