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:
Fynn Petersen-Frey 2022-11-28 17:01:09 +01:00 committed by GitHub
parent 024177515d
commit d82dec9773
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 11 deletions

View file

@ -38,7 +38,7 @@ class AssetNotifier extends StateNotifier<List<Asset>> {
final bool isCacheValid = await _assetCacheService.isValid();
stopwatch.start();
final localTask = _assetService.getLocalAssets(urgent: !isCacheValid);
final remoteTask = _assetService.getRemoteAssets();
final remoteTask = _assetService.getRemoteAssets(hasCache: isCacheValid);
if (isCacheValid && state.isEmpty) {
state = await _assetCacheService.get();
log.info(