Эх сурвалжийг харах

MEGA coding

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 2 жил өмнө
parent
commit
13061c6d05

+ 7 - 0
iOSClient/Data/NCDataSource.swift

@@ -61,6 +61,13 @@ class NCDataSource: NSObject {
 
     // MARK: -
 
+    func clearDataSource() {
+
+        self.metadatasSource.removeAll()
+        self.metadatasForSection.removeAll()
+        self.sectionsValue.removeAll()
+    }
+
     func createSections() {
 
         self.sectionsValue = metadatasSource.map { getSectionValue(metadata: $0) }

+ 2 - 0
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -984,6 +984,8 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
         }
 
         isReloadDataSourceNetworkInProgress = true
+        self.metadatasSource.removeAll()
+        self.dataSource.clearDataSource()
         collectionView?.reloadData()
         
         let serverVersionMajor = NCManageDatabase.shared.getCapabilitiesServerInt(account: appDelegate.account, elements: NCElementsJSON.shared.capabilitiesVersionMajor)