Pārlūkot izejas kodu

fix show-in-chat-feature for the document gallery

cyberta 4 gadi atpakaļ
vecāks
revīzija
e21cdc0245

+ 4 - 4
deltachat-ios/Controller/DocumentGalleryController.swift

@@ -171,16 +171,16 @@ extension DocumentGalleryController {
         let msgId = fileMessageIds[indexPath.row]
 
         guard
-            let chatViewController = navigationController?.viewControllers.filter ({ $0 is ChatViewController}).first as? ChatViewController,
+            let chatViewController = navigationController?.viewControllers.filter({ $0 is ChatViewController}).first as? ChatViewController,
             let chatListController = navigationController?.viewControllers.filter({ $0 is ChatListController}).first as? ChatListController
         else {
-            safe_fatalError("failt to retrieve chatViewController, chatListController in navigation stack")
+            safe_fatalError("failed to retrieve chatViewController, chatListController in navigation stack")
             return
         }
         self.navigationController?.viewControllers.remove(at: 1)
-
+        
+        chatViewController.highlightedMsg = msgId
         self.navigationController?.pushViewController(chatViewController, animated: true)
         self.navigationController?.setViewControllers([chatListController, chatViewController], animated: false)
-        chatViewController.scrollToMessage(msgId: msgId)
     }
 }