diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-06-12 16:05:45 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-06-12 16:05:45 +0200 |
commit | e6878ee298525ac7808595418c4b84b93788ff2e (patch) | |
tree | 5d0b397ab8836e65963e4b542163861163b91429 /resources | |
parent | Merge branch 'master' into qml-roomlist (diff) | |
download | nheko-e6878ee298525ac7808595418c4b84b93788ff2e.tar.xz |
Don't read avatarUrl from local profile, if no global avatar is set
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/RoomList.qml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/resources/qml/RoomList.qml b/resources/qml/RoomList.qml index 09fb3701..f31fce60 100644 --- a/resources/qml/RoomList.qml +++ b/resources/qml/RoomList.qml @@ -447,6 +447,8 @@ Page { RowLayout { id: userInfoGrid + property var profile: Nheko.currentUser + spacing: Nheko.paddingMedium anchors.fill: parent anchors.margins: Nheko.paddingMedium @@ -457,9 +459,9 @@ Page { Layout.alignment: Qt.AlignVCenter Layout.preferredWidth: fontMetrics.lineSpacing * 2 Layout.preferredHeight: fontMetrics.lineSpacing * 2 - url: Nheko.currentUser.avatarUrl.replace("mxc://", "image://MxcImage/") - displayName: Nheko.currentUser.displayName - userid: Nheko.currentUser.userid + url: (userInfoGrid.profile ? userInfoGrid.profile.avatarUrl : "").replace("mxc://", "image://MxcImage/") + displayName: userInfoGrid.profile ? userInfoGrid.profile.displayName : "" + userid: userInfoGrid.profile ? userInfoGrid.profile.userid : "" } ColumnLayout { @@ -476,7 +478,7 @@ Page { Layout.alignment: Qt.AlignBottom font.pointSize: fontMetrics.font.pointSize * 1.1 font.weight: Font.DemiBold - fullText: Nheko.currentUser.displayName + fullText: userInfoGrid.profile ? userInfoGrid.profile.displayName : "" elideWidth: col.width } @@ -486,7 +488,7 @@ Page { font.weight: Font.Thin font.pointSize: fontMetrics.font.pointSize * 0.9 elideWidth: col.width - fullText: Nheko.currentUser.userid + fullText: userInfoGrid.profile ? userInfoGrid.profile.userid : "" } } |