Fire event to remove stale entries
This commit is contained in:
parent
3baafc72fb
commit
39affe4004
1 changed files with 17 additions and 2 deletions
|
@ -523,6 +523,13 @@ class FileUploader {
|
|||
);
|
||||
// should delete the fileToUploadEntry
|
||||
await FilesDB.instance.deleteByGeneratedID(fileToUpload.generatedID);
|
||||
|
||||
Bus.instance.fire(
|
||||
LocalPhotosUpdatedEvent(
|
||||
[fileToUpload],
|
||||
type: EventType.deletedFromEverywhere, //
|
||||
),
|
||||
);
|
||||
return Tuple2(true, sameLocalSameCollection);
|
||||
}
|
||||
|
||||
|
@ -546,6 +553,12 @@ class FileUploader {
|
|||
fileToUpload.localID,
|
||||
);
|
||||
await FilesDB.instance.deleteByGeneratedID(fileToUpload.generatedID);
|
||||
Bus.instance.fire(
|
||||
LocalPhotosUpdatedEvent(
|
||||
[fileToUpload],
|
||||
type: EventType.deletedFromEverywhere, //
|
||||
),
|
||||
);
|
||||
return Tuple2(true, fileMissingLocalButSameCollection);
|
||||
}
|
||||
|
||||
|
@ -574,8 +587,10 @@ class FileUploader {
|
|||
)
|
||||
.map((e) => e.localID)
|
||||
.toSet();
|
||||
_logger.fine("Found hashMatch but probably with diff localIDs "
|
||||
"$matchLocalIDs");
|
||||
_logger.fine(
|
||||
"Found hashMatch but probably with diff localIDs "
|
||||
"$matchLocalIDs",
|
||||
);
|
||||
// case e
|
||||
return Tuple2(false, fileToUpload);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue