mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
fix(mobile): fix cache invalidation on logout (#1030)
await all the cache-invalidation operations during logout and catch errors to actually perform all operations.
This commit is contained in:
committed by
GitHub
parent
024177515d
commit
d82dec9773
@@ -30,11 +30,11 @@ class AssetService {
|
||||
AssetService(this._apiService, this._backupService, this._backgroundService);
|
||||
|
||||
/// Returns `null` if the server state did not change, else list of assets
|
||||
Future<List<Asset>?> getRemoteAssets() async {
|
||||
Future<List<Asset>?> getRemoteAssets({required bool hasCache}) async {
|
||||
final Box box = Hive.box(userInfoBox);
|
||||
final Pair<List<AssetResponseDto>, String?>? remote = await _apiService
|
||||
.assetApi
|
||||
.getAllAssetsWithETag(eTag: box.get(assetEtagKey));
|
||||
.getAllAssetsWithETag(eTag: hasCache ? box.get(assetEtagKey) : null);
|
||||
if (remote == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user