fix: improve handling of proxy server URL in dialog

This commit is contained in:
Moustapha Kodjo Amadou 2025-12-23 18:32:04 +01:00
parent b5d37caaa9
commit e40e1b8fe6

View file

@ -352,9 +352,14 @@ void _showAndroidProxyServerDialog(
width: context.width(1), width: context.width(1),
child: ElevatedButton( child: ElevatedButton(
onPressed: () { onPressed: () {
server.split('/').removeLast();
final s = server.split('/');
if (s.isNotEmpty && s.last.isEmpty) {
s.removeLast();
}
ref ref
.read(androidProxyServerStateProvider.notifier) .read(androidProxyServerStateProvider.notifier)
.set(server); .set(s.join('/'));
Navigator.pop(context); Navigator.pop(context);
}, },
child: Text(context.l10n.dialog_confirm), child: Text(context.l10n.dialog_confirm),