فهرست منبع

Merge pull request #1326 from deltachat/contact_request_tweaks2

contact request tweaks
bjoern 3 سال پیش
والد
کامیت
20bf1178df

+ 1 - 0
deltachat-ios/Chat/ChatViewController.swift

@@ -635,6 +635,7 @@ class ChatViewController: UITableViewController {
     }
     }
 
 
     private func configureContactRequestBar() {
     private func configureContactRequestBar() {
+        messageInputBar.separatorLine.backgroundColor = DcColors.colorDisabled
         messageInputBar.setMiddleContentView(contactRequestBar, animated: false)
         messageInputBar.setMiddleContentView(contactRequestBar, animated: false)
         messageInputBar.setLeftStackViewWidthConstant(to: 0, animated: false)
         messageInputBar.setLeftStackViewWidthConstant(to: 0, animated: false)
         messageInputBar.setRightStackViewWidthConstant(to: 0, animated: false)
         messageInputBar.setRightStackViewWidthConstant(to: 0, animated: false)

+ 10 - 7
deltachat-ios/Controller/ChatListController.swift

@@ -50,7 +50,7 @@ class ChatListController: UITableViewController {
         return button
         return button
     }()
     }()
 
 
-    private lazy var emptySearchStateLabel: EmptyStateLabel = {
+    private lazy var emptyStateLabel: EmptyStateLabel = {
         let label = EmptyStateLabel()
         let label = EmptyStateLabel()
         label.isHidden = false
         label.isHidden = false
         return label
         return label
@@ -60,7 +60,7 @@ class ChatListController: UITableViewController {
         self.viewModel = viewModel
         self.viewModel = viewModel
         self.dcContext = dcContext
         self.dcContext = dcContext
         if viewModel.isArchive {
         if viewModel.isArchive {
-            super.init(nibName: nil, bundle: nil)
+            super.init(style: .grouped)
         } else {
         } else {
             super.init(style: .grouped)
             super.init(style: .grouped)
         }
         }
@@ -168,7 +168,7 @@ class ChatListController: UITableViewController {
     
     
     // MARK: - setup
     // MARK: - setup
     private func setupSubviews() {
     private func setupSubviews() {
-        emptySearchStateLabel.addCenteredTo(parentView: view)
+        emptyStateLabel.addCenteredTo(parentView: view)
         navigationItem.backButtonTitle = viewModel.isArchive ? String.localized("chat_archived_chats_title") : String.localized("pref_chats")
         navigationItem.backButtonTitle = viewModel.isArchive ? String.localized("chat_archived_chats_title") : String.localized("pref_chats")
     }
     }
 
 
@@ -379,11 +379,14 @@ class ChatListController: UITableViewController {
                 String.localized("search_no_result_for_x"),
                 String.localized("search_no_result_for_x"),
                 emptySearchText
                 emptySearchText
             )
             )
-            emptySearchStateLabel.text = text
-            emptySearchStateLabel.isHidden = false
+            emptyStateLabel.text = text
+            emptyStateLabel.isHidden = false
+        } else if viewModel.isArchive && viewModel.numberOfRowsIn(section: 0) == 0 {
+            emptyStateLabel.text = String.localized("archive_empty_hint")
+            emptyStateLabel.isHidden = false
         } else {
         } else {
-            emptySearchStateLabel.text = nil
-            emptySearchStateLabel.isHidden = true
+            emptyStateLabel.text = nil
+            emptyStateLabel.isHidden = true
         }
         }
     }
     }
     
     

+ 1 - 1
deltachat-ios/View/ContactCell.swift

@@ -33,7 +33,7 @@ class ContactCell: UITableViewCell {
     }()
     }()
 
 
     lazy var bottomlineStackView: UIStackView = {
     lazy var bottomlineStackView: UIStackView = {
-        let stackView = UIStackView(arrangedSubviews: [subtitleLabel, deliveryStatusIndicator, archivedIndicator, contactRequest, unreadMessageCounter])
+        let stackView = UIStackView(arrangedSubviews: [subtitleLabel, deliveryStatusIndicator, contactRequest, archivedIndicator, unreadMessageCounter])
         stackView.axis = .horizontal
         stackView.axis = .horizontal
         stackView.spacing = 10
         stackView.spacing = 10
         stackView.alignment = .center
         stackView.alignment = .center