Skip to content

Commit

Permalink
[mob][image-editor] dismiss page on save edits (#4036)
Browse files Browse the repository at this point in the history
## Description

Previously saving edits would not close the page, this PR fixes that.

## Tests
  • Loading branch information
prateekmedia authored Nov 15, 2024
2 parents c94feb0 + 120053f commit e0ffde3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mobile/lib/ui/tools/editor/image_editor_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ class _ImageEditorPageState extends State<ImageEditorPage> {
files.add(newFile);
selectionIndex = files.length - 1;
}
await dialog.hide();
replacePage(
context,
DetailPage(
Expand All @@ -397,12 +398,12 @@ class _ImageEditorPageState extends State<ImageEditorPage> {
),
);
} catch (e, s) {
await dialog.hide();
showToast(context, S.of(context).oopsCouldNotSaveEdits);
_logger.severe(e, s);
} finally {
await PhotoManager.startChangeNotify();
}
await dialog.hide();
}

void flip() {
Expand Down

0 comments on commit e0ffde3

Please sign in to comment.