From 6885a64dd6709237a0bc4ab8867bd4186c476e36 Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Tue, 16 Sep 2025 05:32:37 +0200 Subject: [PATCH] remove http only check and only pop on open success --- .../dialogs/open_shared_content.dart | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/app/lib/features/geckoview/features/browser/presentation/dialogs/open_shared_content.dart b/app/lib/features/geckoview/features/browser/presentation/dialogs/open_shared_content.dart index b59df1ca..7e3b208e 100644 --- a/app/lib/features/geckoview/features/browser/presentation/dialogs/open_shared_content.dart +++ b/app/lib/features/geckoview/features/browser/presentation/dialogs/open_shared_content.dart @@ -50,6 +50,10 @@ class OpenSharedContent extends HookConsumerWidget { container: Value(selectedContainer.value), launchedFromIntent: true, ); + + if (context.mounted) { + context.pop(); + } } } @@ -83,11 +87,7 @@ class OpenSharedContent extends HookConsumerWidget { minLines: 1, maxLines: 10, validator: (value) { - return validateUrl( - value, - onlyHttpProtocol: true, - eagerParsing: false, - ); + return validateUrl(value, eagerParsing: false); }, ), ), @@ -96,9 +96,6 @@ class OpenSharedContent extends HookConsumerWidget { leading: const Icon(MdiIcons.tab), onTap: () async { await openTab(false); - if (context.mounted) { - context.pop(); - } }, ), ListTile( @@ -106,9 +103,6 @@ class OpenSharedContent extends HookConsumerWidget { leading: const Icon(MdiIcons.tabUnselected), onTap: () async { await openTab(true); - if (context.mounted) { - context.pop(); - } }, ), ],