mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 07:22:21 +00:00
LibWebView: Disable autocomplete when search is disabled
Search suggestions don't make much sense when search itself is disabled. We now auto-disable autocomplete when search is disabled.
This commit is contained in:
parent
9267172e28
commit
1a9e78a774
Notes:
github-actions[bot]
2025-05-11 15:48:59 +00:00
Author: https://github.com/trflynn89
Commit: 1a9e78a774
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4694
3 changed files with 13 additions and 5 deletions
|
@ -108,9 +108,11 @@ Settings Settings::create(Badge<Application>)
|
|||
settings.m_search_engine = settings.find_search_engine_by_name(*search_engine_name);
|
||||
}
|
||||
|
||||
if (auto autocomplete_engine = settings_json.value().get_object(autocomplete_engine_key); autocomplete_engine.has_value()) {
|
||||
if (auto autocomplete_engine_name = autocomplete_engine->get_string(autocomplete_engine_name_key); autocomplete_engine_name.has_value())
|
||||
settings.m_autocomplete_engine = find_autocomplete_engine_by_name(*autocomplete_engine_name);
|
||||
if (settings.m_search_engine.has_value()) {
|
||||
if (auto autocomplete_engine = settings_json.value().get_object(autocomplete_engine_key); autocomplete_engine.has_value()) {
|
||||
if (auto autocomplete_engine_name = autocomplete_engine->get_string(autocomplete_engine_name_key); autocomplete_engine_name.has_value())
|
||||
settings.m_autocomplete_engine = find_autocomplete_engine_by_name(*autocomplete_engine_name);
|
||||
}
|
||||
}
|
||||
|
||||
auto load_site_setting = [&](SiteSetting& site_setting, StringView key) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue