summary refs log tree commit diff
path: root/resources/qml/delegates/MessageDelegate.qml
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@ymail.com>2022-04-24 16:37:35 +0200
committerNicolas Werner <nicolas.werner@ymail.com>2022-04-24 16:37:35 +0200
commitc21711830f2f56ba45ab6632ab254aebb986fb19 (patch)
tree9b9b26cb357050dd2f178bc09cc41371f0a750d9 /resources/qml/delegates/MessageDelegate.qml
parentFix filtering without using regex (diff)
downloadnheko-c21711830f2f56ba45ab6632ab254aebb986fb19.tar.xz
Fix pinned messages getting clipped
Diffstat (limited to 'resources/qml/delegates/MessageDelegate.qml')
-rw-r--r--resources/qml/delegates/MessageDelegate.qml30
1 files changed, 30 insertions, 0 deletions
diff --git a/resources/qml/delegates/MessageDelegate.qml b/resources/qml/delegates/MessageDelegate.qml
index 44da16bf..5b7f70dd 100644
--- a/resources/qml/delegates/MessageDelegate.qml
+++ b/resources/qml/delegates/MessageDelegate.qml
@@ -12,6 +12,7 @@ Item {
     id: d
 
     required property bool isReply
+    property bool keepFullText: !isReply
     property alias child: chooser.child
     implicitWidth: (chooser.child && chooser.child.implicitWidth) ? chooser.child.implicitWidth : 0
     required property double proportionalHeight
@@ -68,6 +69,7 @@ Item {
                 body: d.body
                 isOnlyEmoji: d.isOnlyEmoji
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 metadataWidth: d.metadataWidth
             }
 
@@ -81,6 +83,7 @@ Item {
                 body: d.body
                 isOnlyEmoji: d.isOnlyEmoji
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 metadataWidth: d.metadataWidth
             }
@@ -96,6 +99,7 @@ Item {
                 body: d.body
                 isOnlyEmoji: d.isOnlyEmoji
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 metadataWidth: d.metadataWidth
             }
@@ -231,6 +235,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: d.roomName ? qsTr("%2 changed the room name to: %1").arg(d.roomName).arg(d.userName) : qsTr("%1 removed the room name").arg(d.userName)
             }
@@ -244,6 +249,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: d.roomTopic ? qsTr("%2 changed the topic to: %1").arg(d.roomTopic).arg(d.userName): qsTr("%1 removed the topic").arg(d.userName)
             }
@@ -257,6 +263,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: qsTr("%1 changed the room avatar").arg(d.userName)
             }
@@ -270,6 +277,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: qsTr("%1 changed the pinned messages.").arg(d.userName)
             }
@@ -283,6 +291,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: d.relatedEventCacheBuster, room.formatImagePackEvent(d.eventId)
             }
@@ -297,6 +306,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: qsTr("%1 changed the addresses for this room.").arg(d.userName)
             }
@@ -310,6 +320,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: qsTr("%1 changed the parent spaces for this room.").arg(d.userName)
             }
@@ -323,6 +334,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: qsTr("%1 created and configured room: %2").arg(d.userName).arg(room.roomId)
             }
@@ -336,6 +348,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: {
                     switch (d.callType) {
@@ -358,6 +371,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: qsTr("%1 answered the call.").arg(d.userName)
             }
@@ -371,6 +385,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: qsTr("%1 ended the call.").arg(d.userName)
             }
@@ -384,6 +399,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: qsTr("%1 is negotiating the call...").arg(d.userName)
             }
@@ -397,6 +413,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: d.relatedEventCacheBuster, room.formatPowerLevelEvent(d.eventId)
             }
@@ -410,6 +427,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: d.relatedEventCacheBuster, room.formatJoinRuleEvent(d.eventId)
             }
@@ -423,6 +441,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: d.relatedEventCacheBuster, room.formatHistoryVisibilityEvent(d.eventId)
             }
@@ -436,6 +455,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: d.relatedEventCacheBuster, room.formatGuestAccessEvent(d.eventId)
             }
@@ -452,6 +472,7 @@ Item {
                     body: formatted
                     isOnlyEmoji: false
                     isReply: d.isReply
+                    keepFullText: d.keepFullText
                     isStateEvent: d.isStateEvent
                     Layout.fillWidth: true
                     formatted: d.relatedEventCacheBuster, room.formatMemberEvent(d.eventId)
@@ -475,6 +496,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: "KeyVerificationRequest"
             }
@@ -488,6 +510,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: "KeyVerificationStart"
             }
@@ -501,6 +524,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: "KeyVerificationReady"
             }
@@ -514,6 +538,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: "KeyVerificationCancel"
             }
@@ -527,6 +552,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: "KeyVerificationKey"
             }
@@ -540,6 +566,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: "KeyVerificationMac"
             }
@@ -553,6 +580,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: "KeyVerificationDone"
             }
@@ -566,6 +594,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: "KeyVerificationDone"
             }
@@ -579,6 +608,7 @@ Item {
                 body: formatted
                 isOnlyEmoji: false
                 isReply: d.isReply
+                keepFullText: d.keepFullText
                 isStateEvent: d.isStateEvent
                 formatted: "KeyVerificationAccept"
             }