Преглед изворни кода

Merge pull request #587 from deltachat/galleryFullScreen

Close item appearance condition fixed
cyBerta пре 5 година
родитељ
комит
ce8df7d08d

+ 1 - 1
deltachat-ios/Controller/PreviewController.swift

@@ -23,7 +23,7 @@ class PreviewController: QLPreviewController {
 
 
     override func viewDidLoad() {
     override func viewDidLoad() {
         super.viewDidLoad()
         super.viewDidLoad()
-        if navigationController != nil && isBeingPresented {
+        if navigationController?.isBeingPresented ?? false {
             /* QLPreviewController comes with a done-button by default. But if is embedded in UINavigationContrller we need to set a done-button manually.
             /* QLPreviewController comes with a done-button by default. But if is embedded in UINavigationContrller we need to set a done-button manually.
             */
             */
             navigationItem.leftBarButtonItem = doneButtonItem
             navigationItem.leftBarButtonItem = doneButtonItem

+ 1 - 1
deltachat-ios/Coordinator/AppCoordinator.swift

@@ -543,7 +543,7 @@ class ChatViewCoordinator: NSObject, Coordinator {
     func showMediaGallery(currentIndex: Int, mediaUrls urls: [URL]) {
     func showMediaGallery(currentIndex: Int, mediaUrls urls: [URL]) {
         let betterPreviewController = PreviewController(currentIndex: currentIndex, urls: urls)
         let betterPreviewController = PreviewController(currentIndex: currentIndex, urls: urls)
         let nav = UINavigationController(rootViewController: betterPreviewController)
         let nav = UINavigationController(rootViewController: betterPreviewController)
-
+        nav.modalPresentationStyle = .fullScreen
         navigationController.present(nav, animated: true)
         navigationController.present(nav, animated: true)
     }
     }
 }
 }