mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
Add cache for shared albums
This commit is contained in:
parent
6796462b13
commit
d77e25425e
3 changed files with 37 additions and 4 deletions
|
|
@ -19,6 +19,7 @@ class AuthenticationNotifier extends StateNotifier<AuthenticationState> {
|
|||
this._apiService,
|
||||
this._assetCacheService,
|
||||
this._albumCacheService,
|
||||
this._sharedAlbumCacheService,
|
||||
) : super(
|
||||
AuthenticationState(
|
||||
deviceId: "",
|
||||
|
|
@ -47,6 +48,7 @@ class AuthenticationNotifier extends StateNotifier<AuthenticationState> {
|
|||
final ApiService _apiService;
|
||||
final AssetCacheService _assetCacheService;
|
||||
final AlbumCacheService _albumCacheService;
|
||||
final SharedAlbumCacheService _sharedAlbumCacheService;
|
||||
|
||||
Future<bool> login(
|
||||
String email,
|
||||
|
|
@ -159,6 +161,7 @@ class AuthenticationNotifier extends StateNotifier<AuthenticationState> {
|
|||
state = state.copyWith(isAuthenticated: false);
|
||||
_assetCacheService.invalidate();
|
||||
_albumCacheService.invalidate();
|
||||
_sharedAlbumCacheService.invalidate();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -206,5 +209,6 @@ final authenticationProvider =
|
|||
ref.watch(apiServiceProvider),
|
||||
ref.watch(assetCacheServiceProvider),
|
||||
ref.watch(albumCacheServiceProvider),
|
||||
ref.watch(sharedAlbumCacheServiceProvider),
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue