Fix avatar loading in multiple places and prefers name instead of

display name for avatar fallback.

This also fixes a bug where users didn't get their avatar loaded in the
room list.

Fix #209
This commit is contained in:
Carl Schwan
2021-01-09 00:37:13 +01:00
parent de23eef519
commit 4be3eac7af
11 changed files with 15 additions and 9 deletions

View File

@@ -92,7 +92,7 @@ Kirigami.ScrollablePage {
id: roomListItem
property bool itemVisible: model.categoryVisible || sortFilterRoomListModel.filterText.length > 0 || Config.mergeRoomList
visible: itemVisible
highlighted: roomManager.currentRoom && roomManager.currentRoom.name === name
highlighted: roomManager.currentRoom && roomManager.currentRoom.displayName === displayName
focus: true
action: Kirigami.Action {
id: enterRoomAction
@@ -151,7 +151,7 @@ Kirigami.ScrollablePage {
QQC2.Label {
Layout.fillWidth: true
Layout.fillHeight: true
text: name ?? ""
text: displayName ?? ""
elide: Text.ElideRight
font.bold: unreadCount >= 0 || highlightCount > 0 || notificationCount > 0
wrapMode: Text.NoWrap