diff options
Diffstat (limited to 'modules/notifications/Notification.qml')
| -rw-r--r-- | modules/notifications/Notification.qml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/notifications/Notification.qml b/modules/notifications/Notification.qml index 1e8f8fe..728cd9f 100644 --- a/modules/notifications/Notification.qml +++ b/modules/notifications/Notification.qml @@ -17,6 +17,7 @@ StyledRect { required property Notifs.Notif modelData readonly property bool hasImage: modelData.image.length > 0 readonly property bool hasAppIcon: modelData.appIcon.length > 0 + readonly property int bodyTextFormat: /[<*_`#\[\]]/.test(modelData.body) ? Text.MarkdownText : Text.PlainText readonly property int nonAnimHeight: summary.implicitHeight + (root.expanded ? appName.height + body.height + actions.height + actions.anchors.topMargin : bodyPreview.height) + inner.anchors.margins * 2 property bool expanded: Config.notifs.openExpanded @@ -347,7 +348,7 @@ StyledRect { anchors.rightMargin: Appearance.spacing.small animate: true - textFormat: Text.MarkdownText + textFormat: root.bodyTextFormat text: bodyPreviewMetrics.elidedText color: Colours.palette.m3onSurfaceVariant font.pointSize: Appearance.font.size.small @@ -378,7 +379,7 @@ StyledRect { anchors.rightMargin: Appearance.spacing.small animate: true - textFormat: Text.MarkdownText + textFormat: root.bodyTextFormat text: root.modelData.body color: Colours.palette.m3onSurfaceVariant font.pointSize: Appearance.font.size.small |