Browse Source

chat list cells and contact cells had accidently transparent background color - fixed

nayooti 5 years ago
parent
commit
bd479c27c9

+ 13 - 6
deltachat-ios/Controller/ChatListController.swift

@@ -305,13 +305,20 @@ extension ChatListController: UITableViewDataSource, UITableViewDelegate {
 
     private func askToChatWith(contactId: Int) {
         let dcContact = DcContact(id: contactId)
-        let alert = UIAlertController(title: String.localizedStringWithFormat(String.localized("ask_start_chat_with"), dcContact.nameNAddr),
-                                      message: nil,
-                                      preferredStyle: .safeActionSheet)
-        alert.addAction(UIAlertAction(title: String.localized("start_chat"), style: .default, handler: { _ in
-            self.coordinator?.showNewChat(contactId: contactId)
+        let alert = UIAlertController(
+            title: String.localizedStringWithFormat(String.localized("ask_start_chat_with"), dcContact.nameNAddr),
+            message: nil,
+            preferredStyle: .safeActionSheet)
+        alert.addAction(UIAlertAction(
+            title: String.localized("start_chat"),
+            style: .default,
+            handler: { _ in
+                self.coordinator?.showNewChat(contactId: contactId)
         }))
-        alert.addAction(UIAlertAction(title: String.localized("cancel"), style: .cancel, handler: { _ in
+        alert.addAction(UIAlertAction(
+            title: String.localized("cancel"),
+            style: .cancel,
+            handler: { _ in
         }))
         self.present(alert, animated: true, completion: nil)
     }

+ 1 - 0
deltachat-ios/Helper/Colors.swift

@@ -8,6 +8,7 @@ struct DcColors {
     static let messageSecondaryColor = UIColor.themeColor(light: UIColor.init(hexString: "ebebed"),
                                                           dark: UIColor.init(hexString: "333333"))
     static let chatBackgroundColor = UIColor.themeColor(light: UIColor(red: 255, green: 255, blue: 255, alpha: 0), dark: .black)
+    static let avatarCellBackgroundColor = UIColor.themeColor(light: .white, dark: .black)
     static let checkmarkGreen = UIColor.themeColor(light: UIColor.rgb(red: 112, green: 177, blue: 92))
     static let defaultTextColor = UIColor.themeColor(light: .darkText, dark: .white)
     static let grayTextColor = UIColor.themeColor(light: .darkGray, dark: .lightGray)

+ 1 - 3
deltachat-ios/View/AvatarTextCell.swift

@@ -62,8 +62,7 @@ class AvatarTextCell: UITableViewCell {
     override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
         super.init(style: style, reuseIdentifier: reuseIdentifier)
         selectionStyle = .none
-        backgroundColor = DcColors.chatBackgroundColor
-        contentView.backgroundColor = DcColors.chatBackgroundColor
+        backgroundColor = DcColors.avatarCellBackgroundColor
         setupSubviews()
     }
 
@@ -193,7 +192,6 @@ class AvatarTextCell: UITableViewCell {
 
     // use this to update cells in cellForRowAt
     func updateCell(cellViewModel: AvatarCellViewModel) {
-
         // subtitle
         subtitleLabel.attributedText = cellViewModel.subtitle.boldAt(indexes: cellViewModel.subtitleHighlightIndexes, fontSize: subtitleLabel.font.pointSize)