Skip to content

armgit / ente

Public Imported from GitHub
0

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

Stay on same page when user doesn't save as other person

laurenspriem53ab5b05c37a
diff --git a/mobile/lib/ui/viewer/people/person_gallery_suggestion.dart b/mobile/lib/ui/viewer/people/person_gallery_suggestion.dart
index 815a745208..b570c0a41f 100644
--- a/mobile/lib/ui/viewer/people/person_gallery_suggestion.dart
+++ b/mobile/lib/ui/viewer/people/person_gallery_suggestion.dart
@@ -255,7 +255,7 @@ class _PersonGallerySuggestionState extends State<PersonGallerySuggestion>
final clusterID = currentSuggestion.clusterIDToMerge;
final someFile = currentSuggestion.filesInCluster.first;
- await Navigator.of(context).push(
+ final result = await Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => SaveOrEditPerson(
clusterID,
@@ -264,6 +264,16 @@ class _PersonGallerySuggestionState extends State<PersonGallerySuggestion>
),
),
);
+ if (result == null || result == false) {
+ // Animate back in and reset processing state
+ unawaited(_animateIn());
+ if (mounted) {
+ setState(() {
+ isProcessing = false;
+ });
+ }
+ return;
+ }
// Wait for animation to complete before hiding widget
await Future.delayed(const Duration(milliseconds: 300));
if (mounted) {