Bläddra i källkod

Merge pull request #238 from deltachat/fallback_avatars_in_recycled_list_items

reset backup image color if there's an avatar image
björn petersen 5 år sedan
förälder
incheckning
24bbd38ac4

+ 1 - 0
deltachat-ios/Controller/ChatListController.swift

@@ -150,6 +150,7 @@ extension ChatListController: UITableViewDataSource, UITableViewDelegate {
 
         cell.nameLabel.text = chat.name
         if let img = chat.profileImage {
+            cell.resetBackupImage()
             cell.setImage(img)
         } else {
             cell.setBackupImage(name: chat.name, color: chat.color)

+ 5 - 0
deltachat-ios/View/ContactCell.swift

@@ -172,6 +172,11 @@ class ContactCell: UITableViewCell {
         }
     }
 
+    func resetBackupImage() {
+        initialsLabel.text = ""
+        setColor(UIColor.clear)
+    }
+
     func setBackupImage(name: String, color: UIColor) {
         let text = Utils.getInitials(inputName: name)