Avatar icon when creating a contact (and more generally with empty display name)

This commit is contained in:
Christophe Deschamps 2023-02-07 12:31:10 +01:00
parent 8cbeac0e54
commit bac9d2b98e

View file

@ -115,6 +115,9 @@ class Avatar : UIView {
if (shared == nil) {
prepareIt()
}
if (displayName.replacingOccurrences(of: " ", with: "").count == 0) {
return Avatar.singleAvatar
}
shared?.initialsLabel.text = Address.initials(displayName: displayName)
shared?.initialsLabel.isHidden = false
shared?.iconImageView.isHidden = true