Marino Faggiana 7 년 전
부모
커밋
3675774ac7
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      PickerFileProvider/FileProviderEnumeratorWorkingSet.swift
  2. 1 1
      iOSClient/Database/NCManageDatabase.swift

+ 1 - 1
PickerFileProvider/FileProviderEnumeratorWorkingSet.swift

@@ -58,7 +58,7 @@ class FileProviderEnumeratorWorkingSet: NSObject, NSFileProviderEnumerator {
         }
         
         // Favorite
-        let metadatas = NCManageDatabase.sharedInstance.getMetadatas(predicate: NSPredicate(format: "account = %@ AND favorite = true", account), sorted: "fileName", ascending: true)
+        let metadatas = NCManageDatabase.sharedInstance.getMetadatas(predicate: NSPredicate(format: "account = %@ AND favorite = true", account), sorted: "fileNameView", ascending: true)
         if metadatas != nil {
             for metadata in metadatas! {
             

+ 1 - 1
iOSClient/Database/NCManageDatabase.swift

@@ -1948,7 +1948,7 @@ class NCManageDatabase: NSObject {
         var rank = 0 as NSNumber
         var counter = 0 as Int64
         
-        let results = realm.objects(tableMetadata.self).filter("account = %@ AND favorite = true", tableAccount.account).sorted(byKeyPath: "fileID", ascending: true)
+        let results = realm.objects(tableMetadata.self).filter("account = %@ AND favorite = true", tableAccount.account).sorted(byKeyPath: "fileNameView", ascending: true)
         
         for result in results {
             counter += 1