Procházet zdrojové kódy

defined + using sharedCellBackgroundColor

nayooti před 5 roky
rodič
revize
cbc1e0d5e7

+ 5 - 0
DcCore/DcCore/Helper/DcColors.swift

@@ -1,6 +1,10 @@
 import UIKit
 import UIKit
 
 
 public struct DcColors {
 public struct DcColors {
+
+	private static let white 									= #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1)
+	private static let actionCellBackgroundDark		 			= #colorLiteral(red: 0.1031623408, green: 0.1083367988, blue: 0.1185036376, alpha: 1)
+
     public static let primary = UIColor.systemBlue
     public static let primary = UIColor.systemBlue
     public static let colorDisabled = UIColor.themeColor(light: UIColor(white: 0.9, alpha: 1), dark: UIColor(white: 0.2, alpha: 1))
     public static let colorDisabled = UIColor.themeColor(light: UIColor(white: 0.9, alpha: 1), dark: UIColor(white: 0.2, alpha: 1))
     public static let messagePrimaryColor = UIColor.themeColor(light: UIColor.rgb(red: 220, green: 248, blue: 198),
     public static let messagePrimaryColor = UIColor.themeColor(light: UIColor.rgb(red: 220, green: 248, blue: 198),
@@ -9,6 +13,7 @@ public struct DcColors {
                                                           dark: UIColor.init(hexString: "333333"))
                                                           dark: UIColor.init(hexString: "333333"))
     public static let contactCellBackgroundColor = UIColor.themeColor(light: .white, dark: .black)
     public static let contactCellBackgroundColor = UIColor.themeColor(light: .white, dark: .black)
     public static let defaultBackgroundColor = UIColor.themeColor(light: .white, dark: .black)
     public static let defaultBackgroundColor = UIColor.themeColor(light: .white, dark: .black)
+	public static let sharedChatCellBackgroundColor = UIColor.themeColor(light: white, dark: actionCellBackgroundDark)
     public static let chatBackgroundColor = UIColor.themeColor(light: UIColor(red: 255, green: 255, blue: 255, alpha: 0), dark: .black)
     public static let chatBackgroundColor = UIColor.themeColor(light: UIColor(red: 255, green: 255, blue: 255, alpha: 0), dark: .black)
     public static let checkmarkGreen = UIColor.themeColor(light: UIColor.rgb(red: 112, green: 177, blue: 92))
     public static let checkmarkGreen = UIColor.themeColor(light: UIColor.rgb(red: 112, green: 177, blue: 92))
     public static let defaultTextColor = UIColor.themeColor(light: .darkText, dark: .white)
     public static let defaultTextColor = UIColor.themeColor(light: .darkText, dark: .white)

+ 2 - 1
deltachat-ios/Controller/ContactDetailViewController.swift

@@ -169,6 +169,7 @@ class ContactDetailViewController: UITableViewController {
         case .sharedChats:
         case .sharedChats:
             if let cell = tableView.dequeueReusableCell(withIdentifier: ContactCell.reuseIdentifier, for: indexPath) as? ContactCell {
             if let cell = tableView.dequeueReusableCell(withIdentifier: ContactCell.reuseIdentifier, for: indexPath) as? ContactCell {
                 viewModel.update(sharedChatCell: cell, row: row)
                 viewModel.update(sharedChatCell: cell, row: row)
+                cell.backgroundColor = DcColors.sharedChatCellBackgroundColor
                 return cell
                 return cell
             }
             }
         }
         }
@@ -366,7 +367,7 @@ class ContactDetailViewController: UITableViewController {
             messageType3: DC_MSG_VIDEO
             messageType3: DC_MSG_VIDEO
         ).reversed()
         ).reversed()
         let galleryController = GalleryViewController(mediaMessageIds: messageIds)
         let galleryController = GalleryViewController(mediaMessageIds: messageIds)
-            navigationController?.pushViewController(galleryController, animated: true)
+        navigationController?.pushViewController(galleryController, animated: true)
     }
     }
 
 
     private func deleteChat() {
     private func deleteChat() {

+ 0 - 1
deltachat-ios/ViewModel/ContactDetailViewModel.swift

@@ -102,7 +102,6 @@ class ContactDetailViewModel {
         let chatId = sharedChats.getChatId(index: index)
         let chatId = sharedChats.getChatId(index: index)
         let summary = sharedChats.getSummary(index: index)
         let summary = sharedChats.getSummary(index: index)
         let unreadMessages = context.getUnreadMessages(chatId: chatId)
         let unreadMessages = context.getUnreadMessages(chatId: chatId)
-
         let cellData = ChatCellData(chatId: chatId, summary: summary, unreadMessages: unreadMessages)
         let cellData = ChatCellData(chatId: chatId, summary: summary, unreadMessages: unreadMessages)
         let cellViewModel = ChatCellViewModel(dcContext: context, chatData: cellData)
         let cellViewModel = ChatCellViewModel(dcContext: context, chatData: cellData)
         cell.updateCell(cellViewModel: cellViewModel)
         cell.updateCell(cellViewModel: cellViewModel)