marinofaggiana 4 years ago
parent
commit
2015876c56

+ 2 - 0
iOSClient/FileViewInFolder/NCFileViewInFolder.swift

@@ -47,6 +47,8 @@ class NCFileViewInFolder: NCCollectionViewCommon  {
             self.navigationItem.title = CCUtility.getLastPath(fromServerUrl: serverUrl, urlBase: appDelegate.urlBase)
             self.navigationItem.title = CCUtility.getLastPath(fromServerUrl: serverUrl, urlBase: appDelegate.urlBase)
         }
         }
         
         
+        appDelegate.activeViewController = self
+        
         (layout, _, _, groupBy, _, titleButton, itemForLine) = NCUtility.shared.getLayoutForView(key: layoutKey, serverUrl: serverUrl)
         (layout, _, _, groupBy, _, titleButton, itemForLine) = NCUtility.shared.getLayoutForView(key: layoutKey, serverUrl: serverUrl)
         gridLayout.itemForLine = CGFloat(itemForLine)
         gridLayout.itemForLine = CGFloat(itemForLine)
         
         

+ 0 - 6
iOSClient/Main/NCCollectionViewCommon.swift

@@ -1198,12 +1198,6 @@ extension NCCollectionViewCommon: UICollectionViewDelegate {
             } else {
             } else {
                 NCNetworking.shared.download(metadata: metadataTouch!, selector: selectorLoadFileView) { (_) in }
                 NCNetworking.shared.download(metadata: metadataTouch!, selector: selectorLoadFileView) { (_) in }
             }
             }
-            
-            if layoutKey == k_layout_view_viewInFolder {
-                dismiss(animated: true) {
-                    self.appDelegate.activeFileViewInFolder = nil
-                }
-            }
         }
         }
     }
     }
     
     

+ 2 - 0
iOSClient/Networking/NCNetworkingNotificationCenter.swift

@@ -183,6 +183,8 @@ import Foundation
             (self.appDelegate.activeViewController as! NCOffline).segue(metadata: metadata)
             (self.appDelegate.activeViewController as! NCOffline).segue(metadata: metadata)
         } else if self.appDelegate.activeViewController is NCRecent {
         } else if self.appDelegate.activeViewController is NCRecent {
             (self.appDelegate.activeViewController as! NCRecent).segue(metadata: metadata)
             (self.appDelegate.activeViewController as! NCRecent).segue(metadata: metadata)
+        } else if self.appDelegate.activeViewController is NCFileViewInFolder {
+            (self.appDelegate.activeViewController as! NCFileViewInFolder).segue(metadata: metadata)
         }
         }
     }
     }