Ver Fonte

contact cell now updates contacts avatar image if needed

nayooti há 5 anos atrás
pai
commit
bdc3a65c90
1 ficheiros alterados com 6 adições e 2 exclusões
  1. 6 2
      deltachat-ios/View/ContactCell.swift

+ 6 - 2
deltachat-ios/View/ContactCell.swift

@@ -279,8 +279,12 @@ class ContactCell: UITableViewCell {
         case .contact(let contactData):
             let contact = DcContact(id: contactData.contactId)
             titleLabel.attributedText = cellViewModel.title.boldAt(indexes: cellViewModel.titleHighlightIndexes, fontSize: titleLabel.font.pointSize)
-            avatar.setName(cellViewModel.title)
-            avatar.setColor(contact.color)
+            if let profileImage = contact.profileImage {
+                avatar.setImage(profileImage)
+            } else {
+                avatar.setName(cellViewModel.title)
+                avatar.setColor(contact.color)
+            }
             setStatusIndicators(unreadCount: 0, status: 0, visibility: 0, isLocationStreaming: false)
         }
     }