Skip to content
Snippets Groups Projects
Verified Commit 1a6728fe authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Fix newlines in status messages

parent 5d7deca0
No related branches found
No related tags found
No related merge requests found
Pipeline #4435 passed
......@@ -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);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment