Skip to content

armgit / ente

Public Imported from GitHub
0

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

Add tap to go to previous or next story in FullScreenMemory screen

ashilknc8c421e01157
diff --git a/lib/ui/home/memories/full_screen_memory_new.dart b/lib/ui/home/memories/full_screen_memory_new.dart
index 75460f2e85..63addcf365 100644
--- a/lib/ui/home/memories/full_screen_memory_new.dart
+++ b/lib/ui/home/memories/full_screen_memory_new.dart
@@ -201,12 +201,34 @@ class _FullScreenMemoryNewState extends State<FullScreenMemoryNew> {
return Stack(
alignment: Alignment.bottomCenter,
children: [
- FileWidget(
- inheritedData.memories[index].file,
- autoPlay: false,
- tagPrefix: "memories",
- backgroundDecoration: const BoxDecoration(
- color: Colors.transparent,
+ GestureDetector(
+ onTapDown: (TapDownDetails details) {
+ final screenWidth = MediaQuery.of(context).size.width;
+ final edgeWidth = screenWidth * 0.33;
+ if (details.localPosition.dx < edgeWidth) {
+ if (index > 0) {
+ _pageController!.previousPage(
+ duration: const Duration(milliseconds: 250),
+ curve: Curves.ease,
+ );
+ }
+ } else if (details.localPosition.dx >
+ screenWidth - edgeWidth) {
+ if (index < (inheritedData.memories.length - 1)) {
+ _pageController!.nextPage(
+ duration: const Duration(milliseconds: 250),
+ curve: Curves.ease,
+ );
+ }
+ }
+ },
+ child: FileWidget(
+ inheritedData.memories[index].file,
+ autoPlay: false,
+ tagPrefix: "memories",
+ backgroundDecoration: const BoxDecoration(
+ color: Colors.transparent,
+ ),
),
),
const BottomGradient(),