Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mobile][photos] Close only the sub-editor on cancel

r4khul15e154eb4fd4
diff --git a/mobile/apps/photos/changes/editor-cancel-sub-editor.md b/mobile/apps/photos/changes/editor-cancel-sub-editor.md
new file mode 100644
index 0000000000..a13042c352
--- /dev/null
+++ b/mobile/apps/photos/changes/editor-cancel-sub-editor.md
@@ -0,0 +1 @@
+- Fixed the photo editor reappearing without its tools after cancelling an edit.
diff --git a/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page.dart b/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page.dart
index d7969f1392..cd62c60203 100644
--- a/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page.dart
+++ b/mobile/apps/photos/lib/ui/tools/editor/image_editor/image_editor_page.dart
@@ -267,7 +267,11 @@ class _ImageEditorPageState extends State<ImageEditorPage> {
key: editorKey,
widget.file,
callbacks: ProImageEditorCallbacks(
- onCloseEditor: (_) {
+ onCloseEditor: (mode) {
+ if (mode != EditorMode.main) {
+ Navigator.of(context).pop();
+ return;
+ }
editorKey.currentState?.isPopScopeDisabled = true;
_showExitConfirmationDialog(context);
},