Эх сурвалжийг харах

rename view controllers back button stacked on top of ChatListViewController to 'Chats'

cyberta 4 жил өмнө
parent
commit
8d8b4b8c1c

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

@@ -169,6 +169,9 @@ class ChatListController: UITableViewController {
     // MARK: - setup
     private func setupSubviews() {
         emptySearchStateLabel.addCenteredTo(parentView: view)
+        let backButton = UIBarButtonItem()
+        backButton.title = String.localized("pref_chats")
+        navigationItem.backBarButtonItem = backButton
     }
 
     @objc
@@ -178,8 +181,6 @@ class ChatListController: UITableViewController {
         navigationController?.pushViewController(connectivityViewController, animated: true)
     }
 
-    
-
     // MARK: - configuration
     private func configureTableView() {
         tableView.register(ContactCell.self, forCellReuseIdentifier: chatCellReuseIdentifier)
@@ -378,11 +379,18 @@ class ChatListController: UITableViewController {
         } else if viewModel.isArchive {
             titleView.text = String.localized("chat_archived_chats_title")
             navigationItem.setLeftBarButton(nil, animated: true)
+           
         } else {
             titleView.text = DcUtils.getConnectivityString(dcContext: dcContext, connectedString: String.localized("app_name"))
             navigationItem.setLeftBarButton(nil, animated: true)
         }
         titleView.sizeToFit()
+        
+        /**
+         let backItem = UIBarButtonItem()
+             backItem.title = "Something Else"
+         */
+        
     }
 
     func handleChatListUpdate() {