Ver Fonte

cell now uses bg color

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

+ 3 - 13
deltachat-ios/View/ContactCell.swift

@@ -252,7 +252,7 @@ class ContactCell: UITableViewCell {
         case .deaddrop(let deaddropData):
             safe_assert(deaddropData.chatId == DC_CHAT_ID_DEADDROP)
             backgroundColor = DcColors.deaddropBackground
-            contentView.backgroundColor = DcColors.deaddropBackground
+            // contentView.backgroundColor = DcColors.deaddropBackground
             let contact = DcContact(id: DcMsg(id: deaddropData.msgId).fromContactId)
             if let img = contact.profileImage {
                 resetBackupImage()
@@ -273,9 +273,9 @@ class ContactCell: UITableViewCell {
                 titleLabel.attributedText = cellViewModel.title.boldAt(indexes: cellViewModel.titleHighlightIndexes, fontSize: titleLabel.font.pointSize)
             }
             if chat.visibility == DC_CHAT_VISIBILITY_PINNED {
-                contentView.backgroundColor = DcColors.deaddropBackground
+                backgroundColor = DcColors.deaddropBackground
             } else {
-                contentView.backgroundColor = DcColors.contactCellBackgroundColor
+                backgroundColor = DcColors.contactCellBackgroundColor
             }
             if let img = chat.profileImage {
                 resetBackupImage()
@@ -308,14 +308,4 @@ class ContactCell: UITableViewCell {
                                 isMuted: false)
         }
     }
-
-    private var bgColor: UIColor?
-    override func setSelected(_ selected: Bool, animated: Bool) {
-        if selected {
-            bgColor = contentView.backgroundColor
-            contentView.backgroundColor = nil
-        } else {
-            contentView.backgroundColor = bgColor
-        }
-    }
 }