From 7741d2265aceb634a25f6b66ba6b6fe9422baf86 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Wed, 20 Aug 2025 00:07:01 +0200 Subject: [PATCH] Implement presence --- src/app/qml/UserDetailDialog.qml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/src/app/qml/UserDetailDialog.qml b/src/app/qml/UserDetailDialog.qml index aa2840395..ae43f54c8 100644 --- a/src/app/qml/UserDetailDialog.qml +++ b/src/app/qml/UserDetailDialog.qml @@ -126,14 +126,32 @@ Kirigami.Dialog { } } - Kirigami.Chip { - visible: root.room - text: root.room ? QmlUtils.nameForPowerLevelValue(root.room.memberEffectivePowerLevel(root.user.id)) : "" - closable: false - checkable: false - + Flow { Layout.leftMargin: Kirigami.Units.largeSpacing Layout.bottomMargin: Kirigami.Units.largeSpacing + + Kirigami.Chip { + visible: root.room + text: root.room ? QmlUtils.nameForPowerLevelValue(root.room.memberEffectivePowerLevel(root.user.id)) : "" + closable: false + checkable: false + + } + + Kirigami.Chip { + id: onlineChip + visible: root.room && root.connection.isUserPresent(root.user.id) + text: i18nc("@info", "Online") + closable: false + checkable: false + + Connections { + target: root.connection + function onPresenceChanged() { + onlineChip.visible = root.room && root.connection.isUserPresent(root.user.id) + } + } + } } Kirigami.Separator {