Browse Source

remove old code

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 1 year ago
parent
commit
c56fd56c9e
1 changed files with 1 additions and 20 deletions
  1. 1 20
      iOSClient/Viewer/NCViewerPDF/NCViewerPDF.swift

+ 1 - 20
iOSClient/Viewer/NCViewerPDF/NCViewerPDF.swift

@@ -254,9 +254,6 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate {
         swipePdfThumbnailScrollView.direction = .right
         pdfThumbnailScrollView.addGestureRecognizer(swipePdfThumbnailScrollView)
 
-        // FUNC
-
-        setThumbnailConstraints()
         handlePageChange()
         showTip()
     }
@@ -270,8 +267,7 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate {
             self.pdfThumbnailScrollViewTrailingAnchor?.constant = self.thumbnailViewWidth + (self.window?.safeAreaInsets.right ?? 0)
             self.pdfThumbnailScrollView.isHidden = true
         }, completion: { context in
-            self.setThumbnailConstraints()
-            self.showTip()
+            self.pdfView.autoScales = true
         })
     }
 
@@ -493,21 +489,6 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate {
 
     // MARK: -
 
-    func setThumbnailConstraints() {
-
-        let widthThumbnail = thumbnailViewWidth + (window?.safeAreaInsets.right ?? 0)
-
-        UIView.animate(withDuration: animateDuration, animations: {
-            // Close
-            self.pdfThumbnailScrollView.isHidden = true
-            self.pdfThumbnailScrollViewTrailingAnchor?.constant = widthThumbnail
-            self.pdfThumbnailScrollViewWidthAnchor?.constant = widthThumbnail
-
-            self.pdfContainer.layoutIfNeeded()
-            self.pdfView.autoScales = true
-        })
-    }
-
     @objc func handlePageChange() {
 
         guard let curPage = pdfView.currentPage?.pageRef?.pageNumber else { pageView.alpha = 0; return }