소스 검색

fix back-button and hide new-button for 'Archived Chats'

B. Petersen 4 년 전
부모
커밋
08ce56e723
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      deltachat-ios/Controller/ChatListController.swift

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

@@ -74,8 +74,8 @@ class ChatListController: UITableViewController {
     // MARK: - lifecycle
     // MARK: - lifecycle
     override func viewDidLoad() {
     override func viewDidLoad() {
         super.viewDidLoad()
         super.viewDidLoad()
-        navigationItem.rightBarButtonItem = newButton
         if !viewModel.isArchive {
         if !viewModel.isArchive {
+            navigationItem.rightBarButtonItem = newButton
             navigationItem.searchController = searchController
             navigationItem.searchController = searchController
         }
         }
         configureTableView()
         configureTableView()
@@ -169,7 +169,7 @@ class ChatListController: UITableViewController {
     // MARK: - setup
     // MARK: - setup
     private func setupSubviews() {
     private func setupSubviews() {
         emptySearchStateLabel.addCenteredTo(parentView: view)
         emptySearchStateLabel.addCenteredTo(parentView: view)
-        navigationItem.backButtonTitle = String.localized("pref_chats")
+        navigationItem.backButtonTitle = viewModel.isArchive ? String.localized("chat_archived_chats_title") : String.localized("pref_chats")
     }
     }
 
 
     @objc
     @objc