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 0eda9608ec
commit 421422edd0
11 changed files with 15 additions and 9 deletions

View File

@@ -95,7 +95,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
@@ -153,7 +153,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