Prechádzať zdrojové kódy

reset backup image if there's a avatar image, so that half transparent avatars are shown correctly (#235)

cyberta 5 rokov pred
rodič
commit
a469ba50b6

+ 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)