diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-02-21 23:25:49 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-02-21 23:25:49 +0100 |
commit | 5d7deca0db32967ef5d31ae1b7f0d16c7f9da4df (patch) | |
tree | 41aeee83a559ae6938804d60b0ec3a180c06483a /resources/qml/dialogs/UserProfile.qml | |
parent | Merge pull request #1379 from Bubu/style_presence_status (diff) | |
download | nheko-5d7deca0db32967ef5d31ae1b7f0d16c7f9da4df.tar.xz |
Simplify status message in profile a bit
Diffstat (limited to 'resources/qml/dialogs/UserProfile.qml')
-rw-r--r-- | resources/qml/dialogs/UserProfile.qml | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/resources/qml/dialogs/UserProfile.qml b/resources/qml/dialogs/UserProfile.qml index 75852245..149aef7a 100644 --- a/resources/qml/dialogs/UserProfile.qml +++ b/resources/qml/dialogs/UserProfile.qml @@ -179,22 +179,19 @@ ApplicationWindow { MatrixText { id: statusMsg - text: updateStatus() - visible: Presence.userStatus(profile.userid) != "" - Layout.alignment: Qt.AlignHCenter + text: qsTr("<i><b>Status:</b> %1</i>").arg(userStatus) + visible: userStatus != "" Layout.fillWidth: true horizontalAlignment: TextEdit.AlignHCenter Layout.leftMargin: Nheko.paddingMedium Layout.rightMargin: Nheko.paddingMedium font.pointSize: Math.floor(fontMetrics.font.pointSize * 0.9) - function updateStatus(){ - return qsTr("<i><b>Status:</b> %1</i>").arg(Presence.userStatus(profile.userid)) - } + property string userStatus: Presence.userStatus(profile.userid) Connections { target: Presence function onPresenceChanged(id) { - if (id == profile.userid) statusMsg.text = statusMsg.updateStatus(); + if (id == profile.userid) statusMsg.userStatus = Presence.userStatus(profile.userid); } } } |