From 62a798d5272c540cae20ccfc160b32758b56c472 Mon Sep 17 00:00:00 2001 From: AmanRajSinghMourya Date: Mon, 7 Jul 2025 15:41:50 +0530 Subject: [PATCH] Minor fix --- .../photos/lib/ui/home/memories/full_screen_memory.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mobile/apps/photos/lib/ui/home/memories/full_screen_memory.dart b/mobile/apps/photos/lib/ui/home/memories/full_screen_memory.dart index c51b38bdfb..65bf33a647 100644 --- a/mobile/apps/photos/lib/ui/home/memories/full_screen_memory.dart +++ b/mobile/apps/photos/lib/ui/home/memories/full_screen_memory.dart @@ -153,6 +153,7 @@ class _FullScreenMemoryState extends State { /// Used to check if any pointer is on the screen. final hasPointerOnScreenNotifier = ValueNotifier(false); bool hasFinalFileLoaded = false; + bool isAtFirstOrLastFile = false; late final StreamSubscription _detailSheetEventSubscription; @@ -219,7 +220,7 @@ class _FullScreenMemoryState extends State { _progressAnimationController?.stop(); _zoomAnimationController?.stop(); } else { - if (hasFinalFileLoaded) { + if (hasFinalFileLoaded || isAtFirstOrLastFile) { _progressAnimationController?.forward(); _zoomAnimationController?.forward(); } @@ -261,7 +262,7 @@ class _FullScreenMemoryState extends State { } else if (widget.onNextMemory != null) { widget.onNextMemory!(); } else { - hasFinalFileLoaded = true; + isAtFirstOrLastFile = true; _toggleAnimation(pause: false); } } @@ -275,7 +276,7 @@ class _FullScreenMemoryState extends State { } else if (widget.onPreviousMemory != null) { widget.onPreviousMemory!(); } else { - hasFinalFileLoaded = true; + isAtFirstOrLastFile = true; _onPageChange(inheritedData, currentIndex); _toggleAnimation(pause: false); }