filter out non http schemes

This commit is contained in:
Fabian Freund
2026-01-23 00:48:06 +01:00
parent 82ea06d0eb
commit aeb8a8d5af
@@ -25,6 +25,8 @@ import 'package:weblibre/features/geckoview/features/browser/presentation/widget
part 'site_settings_badge_provider.g.dart';
const _supportedSchemes = {'http', 'https'};
/// Provider that determines whether to show the site settings badge on the tab icon.
/// Returns true if any site-specific setting has been altered from defaults.
@Riverpod()
@@ -39,6 +41,11 @@ Future<bool> showSiteSettingsBadge(Ref ref) async {
hasTrackingProtectionExceptionProvider(tabState.id).future,
);
if (!tabState.url.hasScheme ||
!_supportedSchemes.contains(tabState.url.scheme)) {
return false;
}
// Watch site permissions
final permissions = await ref.watch(
sitePermissionsRepositoryProvider(