0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-02-04 01:09:14 -05:00

removes deleted asset from gallery list (#1837)

This commit is contained in:
martyfuhry 2023-02-22 21:50:13 -05:00 committed by GitHub
parent 5c86e13239
commit 98a8be82e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,7 +31,7 @@ import 'package:openapi/api.dart' as api;
// ignore: must_be_immutable
class GalleryViewerPage extends HookConsumerWidget {
late List<Asset> assetList;
final List<Asset> assetList;
final Asset asset;
GalleryViewerPage({
@ -43,7 +43,7 @@ class GalleryViewerPage extends HookConsumerWidget {
Asset? assetDetail;
late PageController controller;
final PageController controller;
@override
Widget build(BuildContext context, WidgetRef ref) {
@ -197,6 +197,7 @@ class GalleryViewerPage extends HookConsumerWidget {
curve: Curves.fastLinearToSlowEaseIn,
);
}
assetList.remove(deleteAsset);
ref.watch(assetProvider.notifier).deleteAssets({deleteAsset});
},
);