From 9635b248f864d85a7765d54055194b678309ed0b Mon Sep 17 00:00:00 2001
From: Marcus Hoffmann <bubu@bubu1.eu>
Date: Thu, 16 Feb 2023 23:02:06 +0100
Subject: [PATCH] UserProfile: display status message

Signed-off-by: Marcus Hoffmann <bubu@bubu1.eu>
---
 resources/qml/dialogs/UserProfile.qml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/resources/qml/dialogs/UserProfile.qml b/resources/qml/dialogs/UserProfile.qml
index 684ada8f9..e20c7bc54 100644
--- a/resources/qml/dialogs/UserProfile.qml
+++ b/resources/qml/dialogs/UserProfile.qml
@@ -177,6 +177,21 @@ ApplicationWindow {
                 Layout.alignment: Qt.AlignHCenter
             }
 
+            MatrixText {
+                id: statusMsg
+                text: qsTr("Status: %1").arg(Presence.userStatus(profile.userid))
+                visible: Presence.userStatus(profile.userid) != ""
+                Layout.alignment: Qt.AlignHCenter
+                font.italic: true
+                font.pointSize: Math.floor(fontMetrics.font.pointSize * 0.9)
+                Connections {
+                    target: Presence
+                    function onPresenceChanged(id) {
+                        if (id == profile.userid) statusMsg.text = Presence.userStatus(profile.userid);
+                    }
+                }
+            }
+
             RowLayout {
                 visible: !profile.isGlobalUserProfile
                 Layout.alignment: Qt.AlignHCenter
-- 
GitLab