소스 검색

Merge pull request #249 from ente-io/fix_order

Process updated files in the end
Neeraj Gupta 3 년 전
부모
커밋
4c74ca8f0d
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 11 0
      lib/services/remote_sync_service.dart

+ 11 - 0
lib/services/remote_sync_service.dart

@@ -465,5 +465,16 @@ class RemoteSyncService {
         return -1;
       }
     });
+    // move updated files towards the end
+    file.sort((first, second) {
+      if (first.updationTime == second.updationTime) {
+        return 0;
+      }
+      if (first.updationTime == -1) {
+        return 1;
+      } else {
+        return -1;
+      }
+    });
   }
 }