marinofaggiana 3 年之前
父節點
當前提交
e7cb39aa39
共有 1 個文件被更改,包括 8 次插入7 次删除
  1. 8 7
      iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

+ 8 - 7
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -249,6 +249,8 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
             searchController?.isActive = false
         }
         
+        selectOcId.removeAll()
+        
         // set active serverUrl
         if self.view?.window != nil {
             if serverUrl == "" {
@@ -256,20 +258,19 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
             } else {
                 appDelegate.activeServerUrl = serverUrl
             }
+            
+            appDelegate.listFilesVC.removeAll()
+            appDelegate.listFavoriteVC.removeAll()
+            appDelegate.listOfflineVC.removeAll()
         }
         
         if self is NCFiles || self is NCFavorite || self is NCOffline {
             self.navigationController?.popToRootViewController(animated: false)
         }
-        
-        appDelegate.listFilesVC.removeAll()
-        appDelegate.listFavoriteVC.removeAll()
-        appDelegate.listOfflineVC.removeAll()
-        selectOcId.removeAll()
-        
+       
         setNavigationItem()
-        changeTheming()
         reloadDataSource()
+        changeTheming()
     }
     
     @objc func changeTheming() {