small clean up from PR #275

just removes extraneous assignment to _lastNonRepeatSnapshot and moves
the Navigator pop to after all uses of the context in _RadioSettingsDialog
This commit is contained in:
Enot (ded) Skelly 2026-04-08 10:23:57 -07:00
parent ea3b9609fc
commit 69433b6d89
No known key found for this signature in database
GPG key ID: 2FE5B19B03656304

View file

@ -1162,7 +1162,6 @@ class _RadioSettingsDialogState extends State<_RadioSettingsDialog> {
_clientRepeat = widget.connector.clientRepeat ?? false;
_selectedPresetIndex = _findMatchingPresetIndex();
_lastNonRepeatSnapshot = _currentSnapshot();
if (_clientRepeat) {
_lastNonRepeatSnapshot =
_sessionRememberedNonRepeatSnapshot() ??
@ -1472,7 +1471,6 @@ class _RadioSettingsDialogState extends State<_RadioSettingsDialog> {
}
if (!mounted) return;
Navigator.pop(context);
_logRadioSettingsState('Radio settings saved successfully');
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text(l10n.settings_radioSettingsUpdated)),
@ -1484,6 +1482,7 @@ class _RadioSettingsDialogState extends State<_RadioSettingsDialog> {
SnackBar(content: Text(l10n.settings_error(e.toString()))),
);
}
Navigator.pop(context);
}
String _presetLabel(int? index) {