Skip to content

armgit / ente

Public Imported from GitHub
0

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

add hero animation + mark memory as seen when swiping through memories

ashilknae015c7693f1
diff --git a/lib/ui/home/memories/full_screen_memory_new.dart b/lib/ui/home/memories/full_screen_memory_new.dart
index f67fc84596..af1842b776 100644
--- a/lib/ui/home/memories/full_screen_memory_new.dart
+++ b/lib/ui/home/memories/full_screen_memory_new.dart
@@ -1,3 +1,4 @@
+import "dart:async";
import "dart:io";
import "package:flutter/cupertino.dart";
@@ -266,6 +267,10 @@ class _FullScreenMemoryNewState extends State<FullScreenMemoryNew> {
);
},
onPageChanged: (index) {
+ unawaited(
+ MemoriesService.instance
+ .markMemoryAsSeen(inheritedData.memories[index]),
+ );
inheritedData.indexNotifier.value = index;
},
itemCount: inheritedData.memories.length,
@@ -281,9 +286,12 @@ class _FullScreenMemoryNewState extends State<FullScreenMemoryNew> {
switchInCurve: Curves.easeIn,
switchOutCurve: Curves.easeOut,
child: value
- ? Text(
- widget.title,
- style: darkTextTheme.h2,
+ ? Hero(
+ tag: widget.title,
+ child: Text(
+ widget.title,
+ style: darkTextTheme.h2,
+ ),
)
: showStepProgressIndicator
? const SizedBox.shrink()