Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Disable slideshow heroes without remounting slides

AmanRajSinghMourya17164199875c
diff --git a/mobile/apps/photos/lib/ui/viewer/album_slideshow/album_slideshow_page.dart b/mobile/apps/photos/lib/ui/viewer/album_slideshow/album_slideshow_page.dart
index 31de05ac35..6bfc2fab20 100644
--- a/mobile/apps/photos/lib/ui/viewer/album_slideshow/album_slideshow_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/album_slideshow/album_slideshow_page.dart
@@ -386,25 +386,28 @@ class _AlbumSlideshowPageState extends State<AlbumSlideshowPage>
Widget _buildSlide() {
final file = _currentFile;
return IgnorePointer(
- child: AnimatedSwitcher(
- duration: _autoAdvanceTransition
- ? _autoCrossFadeDuration
- : _manualCrossFadeDuration,
- switchInCurve: Curves.easeOut,
- switchOutCurve: Curves.easeIn,
- layoutBuilder: (currentChild, previousChildren) => Stack(
- fit: StackFit.expand,
- children: [...previousChildren, ?currentChild],
- ),
- child: SizedBox.expand(
- key: ValueKey("album-slideshow-${file.tag}"),
- child: FileWidget(
- file,
- tagPrefix: "album_slideshow",
- backgroundDecoration: const BoxDecoration(),
- isFromMemories: true,
- onFinalFileLoad: ({required int memoryDuration}) =>
- _onSlideReady(file.tag),
+ child: HeroMode(
+ enabled: false,
+ child: AnimatedSwitcher(
+ duration: _autoAdvanceTransition
+ ? _autoCrossFadeDuration
+ : _manualCrossFadeDuration,
+ switchInCurve: Curves.easeOut,
+ switchOutCurve: Curves.easeIn,
+ layoutBuilder: (currentChild, previousChildren) => Stack(
+ fit: StackFit.expand,
+ children: [...previousChildren, ?currentChild],
+ ),
+ child: SizedBox.expand(
+ key: ValueKey("album-slideshow-${file.tag}"),
+ child: FileWidget(
+ file,
+ tagPrefix: "album_slideshow",
+ backgroundDecoration: const BoxDecoration(),
+ isFromMemories: true,
+ onFinalFileLoad: ({required int memoryDuration}) =>
+ _onSlideReady(file.tag),
+ ),
),
),
),