Signed-off-by: marinofaggiana <ios@nextcloud.com>
@@ -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) }
@@ -984,6 +984,8 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
}
isReloadDataSourceNetworkInProgress = true
+ self.dataSource.clearDataSource()
collectionView?.reloadData()
let serverVersionMajor = NCManageDatabase.shared.getCapabilitiesServerInt(account: appDelegate.account, elements: NCElementsJSON.shared.capabilitiesVersionMajor)