Fix outdated albums not getting updated to cache correctly

This commit is contained in:
Ming Ming 2023-04-23 01:37:39 +08:00
parent c62af9941b
commit 2291e3b158

View file

@ -92,7 +92,9 @@ class CachedAlbumRepo2 implements AlbumRepo2 {
// query remote
final outdated = [
...failed,
...cachedGroup[false]?.map((e) => e.albumFile!) ?? const <File>[],
...cachedGroup[false]?.map((e) =>
albumFiles.firstWhere(e.albumFile!.compareServerIdentity)) ??
const <File>[],
];
final remote =
await remoteDataSrc.getAlbums(account, outdated, onError: onError);