Browse Source

add ViewerQuickLook

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 years ago
parent
commit
c26030b7ab
1 changed files with 1 additions and 6 deletions
  1. 1 6
      iOSClient/Viewer/NCViewerQuickLook/ViewerQuickLook.swift

+ 1 - 6
iOSClient/Viewer/NCViewerQuickLook/ViewerQuickLook.swift

@@ -35,7 +35,6 @@ struct ViewerQuickLook: UIViewControllerRepresentable {
             action: #selector(context.coordinator.crop)
         )
 
-        /*
         timer.schedule(deadline: .now(), repeating: 0.3)
         timer.setEventHandler {
             let numItemsRight = controller.navigationItem.rightBarButtonItems?.count ?? 0
@@ -55,7 +54,6 @@ struct ViewerQuickLook: UIViewControllerRepresentable {
             }
         }
         timer.resume()
-        */
 
         let navigationController = UINavigationController(rootViewController: controller)
         return navigationController
@@ -80,15 +78,12 @@ struct ViewerQuickLook: UIViewControllerRepresentable {
         }
 
         @objc func dismiss() {
-            self.viewController?.dismiss(animated: true)
-
-            /*
+            parent.timer.suspend()
             parent.isPresentedQuickLook = false
             if let image = image {
                 parent.previewStore.image = image
             }
             parent.previewStore.hasChanges = hasChange
-            */
         }
 
         // MARK: -