소스 검색

improve detect LivePhoto

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 년 전
부모
커밋
8e73337ae1
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      iOSClient/Data/NCManageDatabase+Metadata.swift

+ 2 - 1
iOSClient/Data/NCManageDatabase+Metadata.swift

@@ -884,7 +884,8 @@ extension NCManageDatabase {
 
         do {
             try realm.write {
-                let results = realm.objects(tableMetadata.self).filter(predicate).sorted(byKeyPath: "fileNameView", ascending: false)
+                let sortProperties = [SortDescriptor(keyPath: "serverUrl", ascending: false), SortDescriptor(keyPath:  "fileNameView", ascending: false)]
+                let results = realm.objects(tableMetadata.self).filter(predicate).sorted(by: sortProperties)
                 if livePhoto {
                     for index in results.indices {
                         let metadata = results[index]