mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-03-27 01:14:43 +01:00
Fix renamed files removed from db
This commit is contained in:
parent
fedfc4b01c
commit
82f43b1370
1 changed files with 3 additions and 2 deletions
|
@ -578,8 +578,9 @@ class FileCachedDataSource implements FileDataSource {
|
|||
/// Remove extra entries from local cache based on remote results
|
||||
Future<void> _cleanUpCacheWithRemote(
|
||||
Account account, List<File> remote, List<File> cache) async {
|
||||
final removed =
|
||||
cache.where((c) => !remote.any((r) => r.path == c.path)).toList();
|
||||
final removed = cache
|
||||
.where((c) => !remote.any((r) => r.compareServerIdentity(c)))
|
||||
.toList();
|
||||
if (removed.isEmpty) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue