Clear unsaved-changes guard before popping on discard

This commit is contained in:
zjs81 committed 2026-10-11 15:25:32 -07:00
1 parent 88dcc5943f
commit b18da94a16
1 file changed
+3
@@ -1487,6 +1487,9 @@ class _RepeaterSettingsScreenState extends State<RepeaterSettingsScreen> {
if (choice == 'save') {
await _saveSettings();
if (!mounted || _hasChanges) return;
} else {
// Drop the PopScope guard so the pop below can't re-trigger this dialog.
setState(() => _hasChanges = false);
}
Navigator.of(context).pop();
}