Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/ios.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarino Faggiana <marino@marinofaggiana.com>2022-09-29 14:30:26 +0300
committerMarino Faggiana <marino@marinofaggiana.com>2022-09-29 14:30:26 +0300
commit2349671607c239973f77519a47ae6255cfd4879d (patch)
tree2dfcd4c9baa8a5ba8920683291563794ef3a0f3d
parenta8dd1003094e884424dcde9319a1da0fa457ec7a (diff)
fix tip
Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
-rw-r--r--iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift18
1 files changed, 12 insertions, 6 deletions
diff --git a/iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift b/iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift
index 86f95e5c4..f8f8c3142 100644
--- a/iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift
+++ b/iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift
@@ -192,10 +192,7 @@ class NCViewerMedia: UIViewController {
viewerMediaPage?.clearCommandCenter()
}
- // TIP
- if !NCManageDatabase.shared.tipExists(NCGlobal.shared.tipNCViewerMediaDetailView), let view = self.navigationController?.navigationBar {
- self.tipView?.show(forView: view)
- }
+ showTip()
NotificationCenter.default.addObserver(self, selector: #selector(openDetail(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterOpenMediaDetail), object: nil)
}
@@ -210,7 +207,6 @@ class NCViewerMedia: UIViewController {
super.viewWillTransition(to: size, with: coordinator)
self.tipView?.dismiss()
-
coordinator.animate(alongsideTransition: { context in
// back to the original size
self.scrollView.zoom(to: CGRect(x: 0, y: 0, width: self.scrollView.bounds.width, height: self.scrollView.bounds.height), animated: false)
@@ -220,7 +216,17 @@ class NCViewerMedia: UIViewController {
self.openDetail()
}
}
- }) { _ in }
+ self.showTip()
+ })
+ }
+
+ // MARK: - Tip
+
+ func showTip() {
+
+ if !NCManageDatabase.shared.tipExists(NCGlobal.shared.tipNCViewerMediaDetailView), let view = self.navigationController?.navigationBar {
+ self.tipView?.show(forView: view)
+ }
}
// MARK: - Image