Skip to content

Commit

Permalink
chore: Use shouldDisplayUserAvatar instead of isMe to determine Avata…
Browse files Browse the repository at this point in the history
…rDisplayType
  • Loading branch information
TommyDL-Infomaniak committed Feb 21, 2025
1 parent cbc142a commit ae00c0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/com/infomaniak/mail/views/AvatarView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class AvatarView @JvmOverloads constructor(
private fun getAvatarDisplayType(correspondent: Correspondent?, bimi: Bimi?, isBimiEnabled: Boolean): AvatarDisplayType {
return when {
correspondent == null -> AvatarDisplayType.UNKNOWN_CORRESPONDENT
correspondent.isMe() -> AvatarDisplayType.USER_AVATAR
correspondent.shouldDisplayUserAvatar() -> AvatarDisplayType.USER_AVATAR
correspondent.hasMergedContactAvatar(contactsFromViewModel) -> AvatarDisplayType.CUSTOM_AVATAR
bimi?.isDisplayable(isBimiEnabled) == true -> AvatarDisplayType.BIMI
else -> AvatarDisplayType.INITIALS
Expand Down

0 comments on commit ae00c0c

Please sign in to comment.