Fix delegate menu for state events
This commit is contained in:
committed by
Tobias Fella
parent
ec5355d86e
commit
94b7fc5cdf
@@ -113,6 +113,7 @@ KirigamiComponents.ConvergentContextMenu {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: Kirigami.Units.gridUnit * 2.5
|
Layout.preferredWidth: Kirigami.Units.gridUnit * 2.5
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
visible: emojiAction.visible
|
||||||
|
|
||||||
contentItem: Kirigami.Heading {
|
contentItem: Kirigami.Heading {
|
||||||
id: emojiText
|
id: emojiText
|
||||||
@@ -155,9 +156,11 @@ KirigamiComponents.ConvergentContextMenu {
|
|||||||
|
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
separator: true
|
separator: true
|
||||||
|
visible: emojiAction.visible
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
|
id: replyAction
|
||||||
visible: root.messageComponentType !== MessageComponentType.Other || NeoChatConfig.relateAnyEvent
|
visible: root.messageComponentType !== MessageComponentType.Other || NeoChatConfig.relateAnyEvent
|
||||||
text: i18nc("@action:inmenu", "Reply")
|
text: i18nc("@action:inmenu", "Reply")
|
||||||
icon.name: "mail-replied-symbolic"
|
icon.name: "mail-replied-symbolic"
|
||||||
@@ -169,6 +172,7 @@ KirigamiComponents.ConvergentContextMenu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
|
id: replyThreadAction
|
||||||
visible: root.messageComponentType !== MessageComponentType.Other || NeoChatConfig.relateAnyEvent
|
visible: root.messageComponentType !== MessageComponentType.Other || NeoChatConfig.relateAnyEvent
|
||||||
text: i18nc("@action:inmenu", "Reply in Thread")
|
text: i18nc("@action:inmenu", "Reply in Thread")
|
||||||
icon.name: "dialog-messages"
|
icon.name: "dialog-messages"
|
||||||
@@ -182,6 +186,7 @@ KirigamiComponents.ConvergentContextMenu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
|
id: editAction
|
||||||
visible: !root.hasFileContent && root.author.isLocalMember && root.messageComponentType === MessageComponentType.Text
|
visible: !root.hasFileContent && root.author.isLocalMember && root.messageComponentType === MessageComponentType.Text
|
||||||
text: i18n("Edit")
|
text: i18n("Edit")
|
||||||
icon.name: "document-edit"
|
icon.name: "document-edit"
|
||||||
@@ -193,6 +198,7 @@ KirigamiComponents.ConvergentContextMenu {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
|
id: removeAction
|
||||||
visible: (root.author.isLocalMember || root.room.canSendState("redact")) && root.messageComponentType !== MessageComponentType.Other
|
visible: (root.author.isLocalMember || root.room.canSendState("redact")) && root.messageComponentType !== MessageComponentType.Other
|
||||||
text: i18nc("@action:button", "Remove…")
|
text: i18nc("@action:button", "Remove…")
|
||||||
icon.name: "edit-delete-remove"
|
icon.name: "edit-delete-remove"
|
||||||
@@ -215,6 +221,7 @@ KirigamiComponents.ConvergentContextMenu {
|
|||||||
|
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
separator: true
|
separator: true
|
||||||
|
visible: replyAction.visible || replyThreadAction.visible || editAction.visible || removeAction.visible
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
|
|||||||
Reference in New Issue
Block a user