feat(StatusMessage): add 'hideMessage' property to allow hiding main message text (#916)

This commit is contained in:
Michał 2022-09-21 10:30:21 +02:00 committed by Michał Cieślak
parent 060b98a74d
commit b1d6e73e2f
1 changed files with 3 additions and 1 deletions

View File

@ -69,6 +69,7 @@ Rectangle {
property color overrideBackgroundColor: "transparent" property color overrideBackgroundColor: "transparent"
property bool overrideBackground: false property bool overrideBackground: false
property bool profileClickable: true property bool profileClickable: true
property bool hideMessage: false
property alias previousMessageIndex: dateGroupLabel.previousMessageIndex property alias previousMessageIndex: dateGroupLabel.previousMessageIndex
property alias previousMessageTimestamp: dateGroupLabel.previousMessageTimestamp property alias previousMessageTimestamp: dateGroupLabel.previousMessageTimestamp
@ -264,6 +265,7 @@ Rectangle {
} }
ColumnLayout { ColumnLayout {
spacing: 4 spacing: 4
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop
Layout.fillWidth: true Layout.fillWidth: true
@ -292,7 +294,7 @@ Rectangle {
} }
Loader { Loader {
Layout.fillWidth: true Layout.fillWidth: true
active: !editMode && !!root.messageDetails.messageText active: !root.editMode && !!root.messageDetails.messageText && !root.hideMessage
visible: active visible: active
sourceComponent: StatusTextMessage { sourceComponent: StatusTextMessage {
objectName: "StatusMessage_textMessage" objectName: "StatusMessage_textMessage"