summary refs log tree commit diff
path: root/resources/qml
diff options
context:
space:
mode:
authorMalte E <malte.e@mailbox.org>2022-02-07 21:53:37 +0100
committerMalte E <malte.e@mailbox.org>2022-02-07 21:53:37 +0100
commit12d600db97db7e6e4d9f3acb2755c6dfb5071a83 (patch)
tree45c1c89f6b71e3f58e12c715c404e2315c5818f3 /resources/qml
parentprint state events without bubbles, displaynames or avatars and in a smaller ... (diff)
downloadnheko-12d600db97db7e6e4d9f3acb2755c6dfb5071a83.tar.xz
add translations and actually add changes to TimelineModel
Diffstat (limited to 'resources/qml')
-rw-r--r--resources/qml/MessageView.qml5
-rw-r--r--resources/qml/delegates/MessageDelegate.qml10
2 files changed, 8 insertions, 7 deletions
diff --git a/resources/qml/MessageView.qml b/resources/qml/MessageView.qml
index 03ed1a8d..aef05a63 100644
--- a/resources/qml/MessageView.qml
+++ b/resources/qml/MessageView.qml
@@ -252,7 +252,7 @@ ScrollView {
                 topPadding: 4
                 bottomPadding: 4
                 spacing: 8
-                visible: (previousMessageUserId !== userId || previousMessageDay !== day || previousMessageIsStateEvent) && !isStateEvent
+                visible: (previousMessageUserId !== userId || previousMessageDay !== day || isStateEvent !== previousMessageIsStateEvent)
                 width: parentWidth
                 height: ((previousMessageDay !== day) ? dateBubble.height : 0) + (isStateEvent? 0 : userName.height +8 )
 
@@ -278,6 +278,7 @@ ScrollView {
                 Row {
                     height: userName_.height
                     spacing: 8
+                    visible: !isStateEvent
 
                     Avatar {
                         id: messageUserAvatar
@@ -289,7 +290,7 @@ ScrollView {
                         userid: userId
                         onClicked: room.openUserProfile(userId)
                         ToolTip.visible: avatarHover.hovered
-                    ToolTip.delay: Nheko.tooltipDelay
+                        ToolTip.delay: Nheko.tooltipDelay
                         ToolTip.text: userid
 
                         HoverHandler {
diff --git a/resources/qml/delegates/MessageDelegate.qml b/resources/qml/delegates/MessageDelegate.qml
index aef69ba4..58f12c91 100644
--- a/resources/qml/delegates/MessageDelegate.qml
+++ b/resources/qml/delegates/MessageDelegate.qml
@@ -186,7 +186,7 @@ Item {
             roleValue: MtxEvent.Redaction
 
             Pill {
-                text: qsTr("removed")
+                text: qsTr("%1 removed a message").arg(d.userName)
                 isStateEvent: d.isStateEvent
             }
 
@@ -196,7 +196,7 @@ Item {
             roleValue: MtxEvent.Encryption
 
             Pill {
-                text: qsTr("Encryption enabled")
+                text: qsTr("%1 enabled encryption").arg(d.userName)
                 isStateEvent: d.isStateEvent
             }
 
@@ -220,7 +220,7 @@ Item {
                 isOnlyEmoji: false
                 isReply: d.isReply
                 isStateEvent: d.isStateEvent
-                formatted: d.roomName ? qsTr("room name changed to: %1").arg(d.roomName) : qsTr("removed room name")
+                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)
             }
 
         }
@@ -233,7 +233,7 @@ Item {
                 isOnlyEmoji: false
                 isReply: d.isReply
                 isStateEvent: d.isStateEvent
-                formatted: d.roomTopic ? qsTr("topic changed to: %1").arg(d.roomTopic) : qsTr("removed topic")
+                formatted: d.roomTopic ? qsTr("%2 changed the topic to: %1").arg(d.roomTopic).arg(d.userName): qsTr("%1 removed the topic").arg(d.userName)
             }
 
         }
@@ -372,7 +372,7 @@ Item {
                 isOnlyEmoji: false
                 isReply: d.isReply
                 isStateEvent: d.isStateEvent
-                formatted: qsTr("Negotiating call...")
+                formatted: qsTr("% is negotiating the call...").arg(d.userName)
             }
 
         }