status-desktop/ui/imports/shared/controls/chat/LinkPreviewSettingsCardMenu.qml
Michał Cieślak ce18a52171 chore(StatusChatInput): Move inline LinkPreviewSettingsCard's menu to separate file
Because of https://bugreports.qt.io/browse/QTBUG-90740 inline context menu causes tests for StatusChatInput crashing (stack overflow) on 5.15.2 (this version is used on CI). The easiest option to solve that problem is moving inline component to a separate file.

Closes: #12435
2023-10-13 16:20:09 +02:00

38 lines
779 B
QML

import StatusQ.Popups 0.1
StatusMenu {
id: root
signal enableLinkPreviewForThisMessage
signal enableLinkPreview
signal disableLinkPreview
hideDisabledItems: false
StatusAction {
text: qsTr("Link previews")
enabled: false
}
StatusAction {
text: qsTr("Show for this message")
icon.name: "show"
onTriggered: root.enableLinkPreviewForThisMessage()
}
StatusAction {
text: qsTr("Always show previews")
icon.name: "show"
onTriggered: root.enableLinkPreview()
}
StatusMenuSeparator { }
StatusAction {
text: qsTr("Never show previews")
icon.name: "hide"
type: StatusAction.Type.Danger
onTriggered: root.disableLinkPreview()
}
}