Really reenable editing messages, don't just do half a job.

This commit is contained in:
James Graham
2026-02-02 15:11:03 +00:00
parent a3cd0c0e8d
commit 234d823366
17 changed files with 132 additions and 421 deletions

View File

@@ -31,7 +31,7 @@ RowLayout {
property bool isBusy: root.room && root.room.hasFileUploading
visible: root.chatBarCache.attachmentPath.length === 0
visible: !root.contentModel.hasAttachment && (root.contentModel?.type ?? true) === LibNeoChat.ChatBarType.Room
icon.name: "mail-attachment"
text: i18n("Attach an image or file")
display: QQC2.AbstractButton.IconOnly
@@ -84,6 +84,7 @@ RowLayout {
}
QQC2.ToolButton {
id: mapButton
visible: (root.contentModel?.type ?? true) === LibNeoChat.ChatBarType.Room
icon.name: "globe"
property bool isBusy: false
text: i18n("Send a Location")
@@ -100,6 +101,7 @@ RowLayout {
}
QQC2.ToolButton {
id: pollButton
visible: (root.contentModel?.type ?? true) === LibNeoChat.ChatBarType.Room
icon.name: "amarok_playcount"
property bool isBusy: false
text: i18nc("@action:button", "Create a Poll")
@@ -128,4 +130,21 @@ RowLayout {
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
QQC2.ToolTip.text: text
}
QQC2.ToolButton {
id: cancelButton
visible: (root.contentModel?.type ?? true) === LibNeoChat.ChatBarType.Edit
display: QQC2.AbstractButton.IconOnly
text: i18nc("@action:button", "Cancel")
icon.name: "dialog-close"
onClicked: root.room.cacheForType(contentModel.type).clearRelations()
Kirigami.Action {
shortcut: "Escape"
onTriggered: cancelButton.clicked()
}
QQC2.ToolTip.text: text
QQC2.ToolTip.visible: hovered
QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay
}
}