|
@@ -24,7 +24,7 @@
|
|
|
import Foundation
|
|
|
import NCCommunication
|
|
|
|
|
|
-class NCFileViewInFolder: NCCollectionViewCommon {
|
|
|
+class NCFileViewInFolder: NCCollectionViewCommon, UIAdaptivePresentationControllerDelegate {
|
|
|
|
|
|
internal var fileName: String?
|
|
|
|
|
@@ -63,6 +63,10 @@ class NCFileViewInFolder: NCCollectionViewCommon {
|
|
|
self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: NSLocalizedString("_close_", comment: ""), style: .plain, target: self, action: #selector(tapClose(sender:)))
|
|
|
}
|
|
|
|
|
|
+ public func presentationControllerDidDismiss( _ presentationController: UIPresentationController) {
|
|
|
+ self.appDelegate.activeFileViewInFolder = nil
|
|
|
+ }
|
|
|
+
|
|
|
// MARK: - TAP EVENT
|
|
|
|
|
|
@objc func tapClose(sender: Any) {
|
|
@@ -143,9 +147,3 @@ class NCFileViewInFolder: NCCollectionViewCommon {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-extension NCFileViewInFolder: UIAdaptivePresentationControllerDelegate {
|
|
|
- public func presentationControllerDidDismiss( _ presentationController: UIPresentationController) {
|
|
|
- self.appDelegate.activeFileViewInFolder = nil
|
|
|
- }
|
|
|
-}
|
|
|
-
|