瀏覽代碼

on forwarding, move saved-messages top, skip confirmation for forwarding to saved-messages

B. Petersen 5 年之前
父節點
當前提交
fd4ed55d4f

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

@@ -117,6 +117,8 @@ class ChatListController: UIViewController {
         var gclFlags: Int32 = 0
         if showArchive {
             gclFlags |= DC_GCL_ARCHIVED_ONLY
+        } else if RelayHelper.sharedInstance.isForwarding() {
+            gclFlags |= DC_GCL_FOR_FORWARDING
         }
         chatList = dcContext.getChatlist(flags: gclFlags, queryString: nil, queryId: 0)
         chatTable.reloadData()

+ 5 - 1
deltachat-ios/Controller/ChatViewController.swift

@@ -614,7 +614,10 @@ class ChatViewController: MessagesViewController {
 
     private func askToForwardMessage() {
         let chat = DcChat(id: self.chatId)
-        confirmationAlert(title: String.localizedStringWithFormat(String.localized("ask_forward"), chat.name),
+        if chat.isSelfTalk {
+            RelayHelper.sharedInstance.forward(to: self.chatId)
+        } else {
+            confirmationAlert(title: String.localizedStringWithFormat(String.localized("ask_forward"), chat.name),
                           actionTitle: String.localized("menu_forward"),
                           actionHandler: { _ in
                             RelayHelper.sharedInstance.forward(to: self.chatId)
@@ -622,6 +625,7 @@ class ChatViewController: MessagesViewController {
                           cancelHandler: { _ in
                             self.dismiss(animated: false, completion: nil)
                             self.coordinator?.navigateBack()})
+        }
     }
 }