add setting to disable automatic clipboard access (#159)

This commit is contained in:
Fabian Freund
2026-02-05 17:19:18 +01:00
parent d17c6e542f
commit be9dd7d2aa
10 changed files with 101 additions and 21 deletions
@@ -39,8 +39,13 @@ class GeckoSuggestionsService extends GeckoSuggestionEvents {
GeckoSuggestionType.clipboard,
GeckoSuggestionType.history,
],
bool allowClipboard = true,
}) {
return _api.querySuggestions(text, providers);
final effectiveProviders = allowClipboard
? providers
: providers.where((p) => p != GeckoSuggestionType.clipboard).toList();
return _api.querySuggestions(text, effectiveProviders);
}
Future<AutocompleteResult?> getAutocompleteSuggestion(String query) {