1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-08 23:07:06 +02:00

fix(mobile): asset state remain in gallery view after being deleted (#10603)

* fix(mobile): asset doesn't get removed from state renderList

* fix delete last assets

* refactor
This commit is contained in:
Alex
2024-06-26 21:15:26 -07:00
committed by GitHub
parent 922430da36
commit d8175d8da8
8 changed files with 158 additions and 140 deletions

View File

@ -16,6 +16,7 @@ import 'package:immich_mobile/models/map/map_marker.model.dart';
import 'package:immich_mobile/providers/map/map_marker.provider.dart';
import 'package:immich_mobile/providers/map/map_state.provider.dart';
import 'package:immich_mobile/utils/map_utils.dart';
import 'package:immich_mobile/widgets/asset_grid/asset_grid_data_structure.dart';
import 'package:immich_mobile/widgets/map/map_app_bar.dart';
import 'package:immich_mobile/widgets/map/map_asset_grid.dart';
import 'package:immich_mobile/widgets/map/map_bottom_sheet.dart';
@ -178,12 +179,17 @@ class MapPage extends HookConsumerWidget {
return;
}
// Since we only have a single asset, we can just show GroupAssetBy.none
final renderList = await RenderList.fromAssets(
[asset],
GroupAssetsBy.none,
);
context.pushRoute(
GalleryViewerRoute(
initialIndex: 0,
loadAsset: (index) => asset,
totalAssets: 1,
heroOffset: 0,
renderList: renderList,
),
);
}