marinofaggiana 4 vuotta sitten
vanhempi
commit
0e1e299918
2 muutettua tiedostoa jossa 6 lisäystä ja 1 poistoa
  1. 5 0
      iOSClient/Main/NCDataSource.swift
  2. 1 1
      iOSClient/Recent/NCRecent.swift

+ 5 - 0
iOSClient/Main/NCDataSource.swift

@@ -58,6 +58,11 @@ class NCDataSource: NSObject {
         
         for metadata in metadatasSource {
             
+            // skipped the root file
+            if metadata.fileName == "." || metadata.serverUrl == ".." {
+                continue
+            }
+            
             // skipped livePhoto
             if metadata.ext == "mov" && metadata.livePhoto && filterLivePhoto {
                 continue

+ 1 - 1
iOSClient/Recent/NCRecent.swift

@@ -52,7 +52,7 @@ class NCRecent: NCCollectionViewCommon  {
         (layout, _, _, groupBy, _, titleButton, itemForLine) = NCUtility.shared.getLayoutForView(key: layoutKey, serverUrl: "")
 
         metadatasSource = NCManageDatabase.sharedInstance.getMetadatas(predicate: NSPredicate(format: "account == %@", appDelegate.account), page: 1, limit: 100, sorted: "date", ascending: false)
-        self.dataSource = NCDataSource.init(metadatasSource: metadatasSource, directoryOnTop: false, favoriteOnTop: true, filterLivePhoto: true)
+        self.dataSource = NCDataSource.init(metadatasSource: metadatasSource, directoryOnTop: false, favoriteOnTop: false, filterLivePhoto: true)
         
         refreshControl.endRefreshing()
         collectionView.reloadData()