marinofaggiana 4 سال پیش
والد
کامیت
1fb35806a4
2فایلهای تغییر یافته به همراه6 افزوده شده و 4 حذف شده
  1. 3 3
      iOSClient/Favorites/NCFavorite.swift
  2. 3 1
      iOSClient/Main/Collection/NCCollectionViewCommon.swift

+ 3 - 3
iOSClient/Favorites/NCFavorite.swift

@@ -52,13 +52,13 @@ class NCFavorite: NCCollectionViewCommon  {
         if !isSearching {
        
             if serverUrl == "" {
-                metadatasSource = NCManageDatabase.sharedInstance.getMetadatas(predicate: NSPredicate(format: "account == %@ AND favorite == true", appDelegate.account))
+                metadatasSource = NCManageDatabase.sharedInstance.getMetadatas(predicate: NSPredicate(format: "account == %@ AND favorite == true", appDelegate.account), page: 0, limit: 0, sorted: sort, ascending: ascending)
             } else {
-                metadatasSource = NCManageDatabase.sharedInstance.getMetadatas(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@", appDelegate.account, serverUrl))
+                metadatasSource = NCManageDatabase.sharedInstance.getMetadatas(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@", appDelegate.account, serverUrl), page: 0, limit: 0, sorted: sort, ascending: ascending)
             }
         }
         
-        self.dataSource = NCDataSource.init(metadatasSource: metadatasSource, sort: sort, ascending: ascending, sorting: true, directoryOnTop: directoryOnTop, filterLivePhoto: true)
+        self.dataSource = NCDataSource.init(metadatasSource: metadatasSource, sort: sort, ascending: ascending, sorting: false, directoryOnTop: directoryOnTop, filterLivePhoto: true)
         
         refreshControl.endRefreshing()
         collectionView.reloadData()

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

@@ -922,7 +922,9 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
         autoUploadFileName = NCManageDatabase.sharedInstance.getAccountAutoUploadFileName()
         autoUploadDirectory = NCManageDatabase.sharedInstance.getAccountAutoUploadDirectory(urlBase: appDelegate.urlBase, account: appDelegate.account)
     }
-    @objc func reloadDataSource(_ notification: NSNotification) { }
+    @objc func reloadDataSource(_ notification: NSNotification) {
+        
+    }
     @objc func reloadDataSourceNetwork(forced: Bool = false) { }
     @objc func reloadDataSourceNetworkRefreshControl() {
         reloadDataSourceNetwork(forced: true)