mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Fix newlines in status messages
This commit is contained in:
parent
5d7deca0db
commit
1a6728fe47
1 changed files with 3 additions and 3 deletions
|
@ -376,7 +376,7 @@ Item {
|
||||||
id: statusMsg
|
id: statusMsg
|
||||||
anchors.baseline: userNameButton.baseline
|
anchors.baseline: userNameButton.baseline
|
||||||
color: Nheko.colors.buttonText
|
color: Nheko.colors.buttonText
|
||||||
text: Presence.userStatus(userId)
|
text: userStatus.replace(/\n/g, " ")
|
||||||
textFormat: Text.PlainText
|
textFormat: Text.PlainText
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
width: Math.min(implicitWidth, userInfo.remainingWidth - userName_.width - parent.spacing)
|
width: Math.min(implicitWidth, userInfo.remainingWidth - userName_.width - parent.spacing)
|
||||||
|
@ -390,11 +390,11 @@ Item {
|
||||||
id: statusMsgHoverHandler
|
id: statusMsgHoverHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property string userStatus: Presence.userStatus(userId)
|
||||||
Connections {
|
Connections {
|
||||||
target: Presence
|
target: Presence
|
||||||
|
|
||||||
function onPresenceChanged(id) {
|
function onPresenceChanged(id) {
|
||||||
if (id == userId) statusMsg.text = Presence.userStatus(userId);
|
if (id == userId) statusMsg.userStatus = Presence.userStatus(userId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue