浏览代码

adapt title of chat list in case of forwarding

cyberta 5 年之前
父节点
当前提交
72cd0eda1a
共有 1 个文件被更改,包括 8 次插入5 次删除
  1. 8 5
      deltachat-ios/Controller/ChatListController.swift

+ 8 - 5
deltachat-ios/Controller/ChatListController.swift

@@ -34,6 +34,14 @@ class ChatListController: UIViewController {
     override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
         getChatList()
+
+        if RelayHelper.sharedInstance.isForwarding() {
+            title = String.localized("forward_to")
+        } else {
+            title = showArchive ? String.localized("chat_archived_chats_title") :
+                String.localized("pref_chats")
+        }
+
     }
 
     override func viewDidAppear(_ animated: Bool) {
@@ -73,11 +81,6 @@ class ChatListController: UIViewController {
     override func viewDidLoad() {
         super.viewDidLoad()
 
-        title = String.localized("pref_chats")
-        if showArchive {
-            title = String.localized("chat_archived_chats_title")
-        }
-
         newButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonItem.SystemItem.compose, target: self, action: #selector(didPressNewChat))
         newButton.tintColor = DcColors.primary
         navigationItem.rightBarButtonItem = newButton