summary refs log tree commit diff
path: root/resources/qml/MessageView.qml
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-02-21 23:35:52 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2023-02-21 23:35:52 +0100
commit1a6728fe476e810d5d2415ed85726564163e97f2 (patch)
treed909b49cfb87d13243419c2b15ef3c3b29fcc070 /resources/qml/MessageView.qml
parentSimplify status message in profile a bit (diff)
downloadnheko-1a6728fe476e810d5d2415ed85726564163e97f2.tar.xz
Fix newlines in status messages
Diffstat (limited to 'resources/qml/MessageView.qml')
-rw-r--r--resources/qml/MessageView.qml6
1 files changed, 3 insertions, 3 deletions
diff --git a/resources/qml/MessageView.qml b/resources/qml/MessageView.qml
index 573c8344..e192c9ea 100644
--- a/resources/qml/MessageView.qml
+++ b/resources/qml/MessageView.qml
@@ -376,7 +376,7 @@ Item {
                         id: statusMsg
                         anchors.baseline: userNameButton.baseline
                         color: Nheko.colors.buttonText
-                        text: Presence.userStatus(userId)
+                        text: userStatus.replace(/\n/g, " ")
                         textFormat: Text.PlainText
                         elide: Text.ElideRight
                         width: Math.min(implicitWidth, userInfo.remainingWidth - userName_.width - parent.spacing)
@@ -390,11 +390,11 @@ Item {
                             id: statusMsgHoverHandler
                         }
 
+                        property string userStatus: Presence.userStatus(userId)
                         Connections {
                             target: Presence
-
                             function onPresenceChanged(id) {
-                                if (id == userId) statusMsg.text = Presence.userStatus(userId);
+                                if (id == userId) statusMsg.userStatus = Presence.userStatus(userId);
                             }
                         }
                     }