Skip to content

Commit

Permalink
fixed bug where the ui does not update on image deletion from album
Browse files Browse the repository at this point in the history
  • Loading branch information
MessadiSaidAbdesslem committed Apr 17, 2024
1 parent 9c696e4 commit f61689d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mobile/lib/modules/album/providers/album.provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:immich_mobile/shared/models/asset.dart';
import 'package:immich_mobile/shared/models/album.dart';
import 'package:immich_mobile/shared/models/store.dart';
import 'package:immich_mobile/shared/models/user.dart';
import 'package:immich_mobile/shared/providers/asset.provider.dart';
import 'package:immich_mobile/shared/providers/db.provider.dart';
import 'package:immich_mobile/utils/renderlist_generator.dart';
import 'package:isar/isar.dart';
Expand Down Expand Up @@ -50,6 +51,9 @@ class AlbumNotifier extends StateNotifier<List<Album>> {

final albumProvider =
StateNotifierProvider.autoDispose<AlbumNotifier, List<Album>>((ref) {
// listen to changes for assets and refresh the remote albums on assets delete or restore to the album
ref.watch(assetProvider);
ref.watch(albumServiceProvider).refreshRemoteAlbums(isShared: false);
return AlbumNotifier(
ref.watch(albumServiceProvider),
ref.watch(dbProvider),
Expand Down

0 comments on commit f61689d

Please sign in to comment.