diff --git a/lib/pages/settings_page.dart b/lib/pages/settings_page.dart index 44fdd80..95f8359 100644 --- a/lib/pages/settings_page.dart +++ b/lib/pages/settings_page.dart @@ -67,16 +67,31 @@ class _SettingsPageState extends State { final configService = AppConfigService(); final config = await configService.loadConfig(); config['api_url'] = url; - if (_successPath != null) config['sound_success'] = _successPath; - else config.remove('sound_success'); - if (_failurePath != null) config['sound_failure'] = _failurePath; - else config.remove('sound_failure'); - if (_beepPath != null) config['sound_beep'] = _beepPath; - else config.remove('sound_beep'); - if (_errorPath != null) config['sound_error'] = _errorPath; - else config.remove('sound_error'); - if (_alertPath != null) config['sound_alert'] = _alertPath; - else config.remove('sound_alert'); + if (_successPath != null) { + config['sound_success'] = _successPath; + } else { + config.remove('sound_success'); + } + if (_failurePath != null) { + config['sound_failure'] = _failurePath; + } else { + config.remove('sound_failure'); + } + if (_beepPath != null) { + config['sound_beep'] = _beepPath; + } else { + config.remove('sound_beep'); + } + if (_errorPath != null) { + config['sound_error'] = _errorPath; + } else { + config.remove('sound_error'); + } + if (_alertPath != null) { + config['sound_alert'] = _alertPath; + } else { + config.remove('sound_alert'); + } await configService.saveConfig(config); setState(() => _saving = false); if (mounted) {