marinofaggiana vor 4 Jahren
Ursprung
Commit
1b7da6ed3d
1 geänderte Dateien mit 6 neuen und 1 gelöschten Zeilen
  1. 6 1
      iOSClient/Main/Collection/NCCollectionViewCommon.swift

+ 6 - 1
iOSClient/Main/Collection/NCCollectionViewCommon.swift

@@ -146,7 +146,6 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
     override func viewWillAppear(_ animated: Bool) {
         super.viewWillAppear(animated)
 
-        appDelegate.activeServerUrl = self.serverUrl
         self.navigationItem.title = titleCurrentFolder
                 
         // get auto upload folder
@@ -162,6 +161,12 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
             collectionView?.collectionViewLayout = gridLayout
         }
         
+        if serverUrl == "" {
+            appDelegate.activeServerUrl = NCUtility.shared.getHomeServer(urlBase: appDelegate.urlBase, account: appDelegate.account)
+        } else {
+            appDelegate.activeServerUrl = self.serverUrl
+        }
+        
         reloadDataSource()
     }