[mob][photos] Make hero animations work

This commit is contained in:
ashilkn 2024-09-11 20:21:14 +05:30
parent d5027c4c65
commit 0ae32a3882
2 changed files with 8 additions and 1 deletions

View File

@ -67,6 +67,11 @@ extension MagicCacheServiceExtension on MagicCache {
MagicResultScreen(
enteFilesInMagicCache,
name: title,
heroTag: GenericSearchResult(
ResultType.magic,
title,
enteFilesInMagicCache,
).heroTag(),
),
);
},

View File

@ -18,6 +18,7 @@ class MagicResultScreen extends StatefulWidget {
final List<EnteFile> files;
final String name;
final bool enableGrouping;
final String heroTag;
static const GalleryType appBarType = GalleryType.magic;
static const GalleryType overlayType = GalleryType.magic;
@ -26,6 +27,7 @@ class MagicResultScreen extends StatefulWidget {
this.files, {
required this.name,
this.enableGrouping = false,
this.heroTag = "",
super.key,
});
@ -104,7 +106,7 @@ class _MagicResultScreenState extends State<MagicResultScreen> {
EventType.deletedFromEverywhere,
EventType.hide,
},
tagPrefix: "",
tagPrefix: widget.heroTag,
selectedFiles: _selectedFiles,
enableFileGrouping: _enableGrouping,
initialFiles: [files.first],