From 32cc5d4e480a591d266892d634047734bf05b3c1 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sun, 4 Jan 2026 18:05:16 -0500 Subject: [PATCH] Allow switching between viewing main profiles and room profiles Since Matrix allows users to have different profiles on a room and "outside of room" level, it's nice to have the ability to switch between them on-the-fly. --- src/app/qml/UserDetailDialog.qml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/app/qml/UserDetailDialog.qml b/src/app/qml/UserDetailDialog.qml index e01557e86..3c1e7002d 100644 --- a/src/app/qml/UserDetailDialog.qml +++ b/src/app/qml/UserDetailDialog.qml @@ -20,6 +20,8 @@ Kirigami.Dialog { // Make sure that code is prepared to deal with this property being null property NeoChatRoom room property var user + // Used for the "View Main Profile" feature so you can toggle back to the room profile. + property NeoChatRoom oldRoom property NeoChatConnection connection @@ -66,7 +68,7 @@ Kirigami.Dialog { Layout.preferredHeight: Kirigami.Units.iconSizes.huge name: root.room ? root.room.member(root.user.id).displayName : root.user.displayName - source: root.room ? root.room.member(root.user.id).avatarUrl : root.user.avatarUrl + source: root.room ? root.room.member(root.user.id).avatarUrl : root.connection.makeMediaUrl(root.user.avatarUrl) color: root.room ? root.room.member(root.user.id).color : QmlUtils.getUserColor(root.user.hueF) } @@ -178,6 +180,26 @@ Kirigami.Dialog { root.connection.reportUser(root.user.id, reason); }); } + }, + Kirigami.Action { + visible: root.room + + text: i18nc("@action:button", "View Main Profile") + icon.name: "user-properties-symbolic" + onTriggered: { + root.oldRoom = root.room; + root.room = null; + } + }, + Kirigami.Action { + visible: !root.room && root.oldRoom + + text: i18nc("@action:button", "View Room Profile") + icon.name: "user-properties-symbolic" + onTriggered: { + root.room = root.oldRoom; + root.oldRoom = null; + } } ] }