From 5e473aae0a24cb29a469d5a8103ebf5d4af0383b Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Wed, 7 Jan 2026 15:46:18 -0500 Subject: [PATCH] Avoid assert check when switching to main profile This can happen if the user doesn't have an avatar set, as there's an assert check inside of makeMediaUrl. We can avoid this by checking if the string is empty before calling that. --- src/app/qml/UserDetailDialog.qml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/qml/UserDetailDialog.qml b/src/app/qml/UserDetailDialog.qml index 3c1e7002d..3a7424581 100644 --- a/src/app/qml/UserDetailDialog.qml +++ b/src/app/qml/UserDetailDialog.qml @@ -68,7 +68,14 @@ 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.connection.makeMediaUrl(root.user.avatarUrl) + source: { + if (root.room) { + return root.room.member(root.user.id).avatarUrl; + } else if(root.user.avatarUrl.toString() !== '') { + return root.connection.makeMediaUrl(root.user.avatarUrl); + } + return ""; + } color: root.room ? root.room.member(root.user.id).color : QmlUtils.getUserColor(root.user.hueF) }