Unify getUser

Always use `NeoChatRoom::getUser` for getting user details in a room context.
- `MessageEventModel` now calls `getUser`
- `getUser` is now overloaded to also be able to take a `NeoChatUser*`
- add params to `getUser` that are needed for the model outputs
This commit is contained in:
James Graham
2023-05-27 18:27:28 +00:00
parent f2aa375b43
commit e1d4b66479
8 changed files with 120 additions and 61 deletions

View File

@@ -54,7 +54,7 @@ Components.AlbumMaximizeComponent {
implicitWidth: Kirigami.Units.iconSizes.medium
implicitHeight: Kirigami.Units.iconSizes.medium
name: root.author.name ?? root.author.displayName
name: root.author.displayName
source: root.author.avatarSource
color: root.author.color
}
@@ -62,7 +62,7 @@ Components.AlbumMaximizeComponent {
spacing: 0
QQC2.Label {
id: userLabel
text: root.author.name ?? root.author.displayName
text: root.author.displayName
color: root.author.color
font.weight: Font.Bold
elide: Text.ElideRight