From 121e8afc24f715c4346ea6380390adea03d7e4bc Mon Sep 17 00:00:00 2001 From: Myzel394 <50424412+Myzel394@users.noreply.github.com> Date: Sun, 21 May 2023 16:17:07 +0200 Subject: [PATCH] feat: Small improvements --- lib/widgets/BottomSheetFilterBuilder.dart | 1 + lib/widgets/RelaySelectSheet.dart | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/widgets/BottomSheetFilterBuilder.dart b/lib/widgets/BottomSheetFilterBuilder.dart index e56fffa1..25fdab2d 100644 --- a/lib/widgets/BottomSheetFilterBuilder.dart +++ b/lib/widgets/BottomSheetFilterBuilder.dart @@ -84,6 +84,7 @@ class _BottomSheetFilterBuilderState onChanged: (value) { updateElements(); }, + spellCheckConfiguration: const SpellCheckConfiguration.disabled(), decoration: InputDecoration( hintText: l10n.searchLabel, suffixIcon: IconButton( diff --git a/lib/widgets/RelaySelectSheet.dart b/lib/widgets/RelaySelectSheet.dart index 4c410b0a..ee9cdb60 100644 --- a/lib/widgets/RelaySelectSheet.dart +++ b/lib/widgets/RelaySelectSheet.dart @@ -113,7 +113,7 @@ class _RelaySelectSheetState extends State { final newValue = addProtocol(value); - if (Uri.tryParse(newValue) == null) { + if (Uri.parse(newValue) == null) { setState(() { _newValue = ""; }); @@ -215,7 +215,7 @@ class _RelaySelectSheetState extends State { return PlatformWidget( material: (context, _) => CheckboxListTile( title: Text( - relay.substring(6), + relay.length >= 6 ? relay.substring(6) : relay, ), value: widget.controller.relays.contains(relay), onChanged: (newValue) { @@ -232,7 +232,7 @@ class _RelaySelectSheetState extends State { ), cupertino: (context, _) => CupertinoListTile( title: Text( - relay.substring(6), + relay.length >= 6 ? relay.substring(6) : relay, ), trailing: CupertinoSwitch( value: widget.controller.relays.contains(relay),