From 8733deb46ac54be0d27f9b4433f1d31820a0d888 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 11 Jan 2025 16:40:07 +1100 Subject: [PATCH] Dialog fixes (#597) * Dialog fixes - Fix bug which did not properly dismiss dialogs - Closes https://github.com/inventree/inventree-app/issues/595 * Bump release notes --- assets/release_notes.md | 5 +++++ lib/widget/dialogs.dart | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/assets/release_notes.md b/assets/release_notes.md index 2f83b6d2..5c1ab3d9 100644 --- a/assets/release_notes.md +++ b/assets/release_notes.md @@ -1,3 +1,8 @@ +### 0.17.3 - December 2025 +--- + +- Fixes bug which prevent dialog boxes from being dismissed correctly + ### 0.17.2 - December 2024 --- diff --git a/lib/widget/dialogs.dart b/lib/widget/dialogs.dart index b4cb5a2f..7812c7ff 100644 --- a/lib/widget/dialogs.dart +++ b/lib/widget/dialogs.dart @@ -22,7 +22,7 @@ Future choiceDialog(String title, List items, {Function? onSelecte GestureDetector( child: items[idx], onTap: () { - Navigator.pop(OneContext().context!); + OneContext().popDialog(); if (onSelected != null) { onSelected(idx); } @@ -48,7 +48,7 @@ Future choiceDialog(String title, List items, {Function? onSelecte TextButton( child: Text(L10().cancel), onPressed: () { - Navigator.pop(OneContext().context!); + Navigator.pop(context); }, ) ],