浏览代码

Look up existing file by uploadId and collectionID (#1281)

Ashil 2 年之前
父节点
当前提交
2deec3e1be
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/services/remote_sync_service.dart

+ 1 - 1
lib/services/remote_sync_service.dart

@@ -662,7 +662,7 @@ class RemoteSyncService {
         // Case [1] Check and clear local cache when uploadedFile already exist
         // Case [1] Check and clear local cache when uploadedFile already exist
         // Note: Existing file can be null here if it's replaced by the time we
         // Note: Existing file can be null here if it's replaced by the time we
         // reach here
         // reach here
-        existingFile = await _db.getFile(remoteFile.generatedID!);
+        existingFile = await _db.getUploadedFile(remoteFile.uploadedFileID!, remoteFile.collectionID!,);
         if (existingFile != null &&
         if (existingFile != null &&
             _shouldClearCache(remoteFile, existingFile)) {
             _shouldClearCache(remoteFile, existingFile)) {
           needsGalleryReload = true;
           needsGalleryReload = true;