marinofaggiana há 4 anos atrás
pai
commit
87c6ab6243

+ 1 - 1
Nextcloud.xcodeproj/project.pbxproj

@@ -1095,10 +1095,10 @@
 				F7F9D1BA25397CE000D9BFF5 /* NCViewer.swift */,
 				F7C7B488245EBA4100D93E60 /* NCViewerQuickLook.swift */,
 				F76D3CEF2428B3DD005DFA87 /* NCViewerPDF */,
+				F71CEB0D253A0B1A00832FFE /* NCViewerVideo */,
 				F79018B1240962C7007C9B6D /* NCViewerImage */,
 				F72D404823D2082500A97FD0 /* NCViewerNextcloudText.swift */,
 				F790110D21415BF600D7B136 /* NCViewerRichdocument.swift */,
-				F71CEB0D253A0B1A00832FFE /* NCViewerVideo */,
 			);
 			path = Viewer;
 			sourceTree = "<group>";

+ 9 - 8
iOSClient/Viewer/NCViewerPDF/NCViewerPDF.swift

@@ -50,6 +50,7 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate {
         NotificationCenter.default.addObserver(self, selector: #selector(renameFile(_:)), name: NSNotification.Name(rawValue: k_notificationCenter_renameFile), object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(moveFile(_:)), name: NSNotification.Name(rawValue: k_notificationCenter_moveFile), object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(changeTheming), name: NSNotification.Name(rawValue: k_notificationCenter_changeTheming), object: nil)
+        
         NotificationCenter.default.addObserver(self, selector: #selector(searchText), name: NSNotification.Name(rawValue: k_notificationCenter_menuSearchTextPDF), object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(handlePageChange), name: Notification.Name.PDFViewPageChanged, object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(viewUnload), name: NSNotification.Name(rawValue: k_notificationCenter_menuDetailClose), object: nil)
@@ -130,10 +131,9 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate {
         appDelegate.activeViewController = self
     }
     
-    //MARK: - Action
-    
-    @objc func openMenuMore() {
-        NCViewer.shared.toggleMoreMenu(viewController: self, metadata: metadata)
+    @objc func viewUnload() {
+        
+        navigationController?.popViewController(animated: true)
     }
     
     //MARK: - NotificationCenter
@@ -178,7 +178,7 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate {
         }
     }
     
-    @objc private func handlePageChange() {
+    @objc func handlePageChange() {
         
         guard let curPage = pdfView.currentPage?.pageRef?.pageNumber else { pageView.alpha = 0; return }
         guard let totalPages = pdfView.document?.pageCount else { return }
@@ -192,9 +192,10 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate {
         })
     }
     
-    @objc func viewUnload() {
-        
-        navigationController?.popViewController(animated: true)
+    //MARK: - Action
+    
+    @objc func openMenuMore() {
+        NCViewer.shared.toggleMoreMenu(viewController: self, metadata: metadata)
     }
     
     //MARK: - Gesture Recognizer