mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:07:45 +00:00
BrowserSettings: Avoid adding empty domain to content filter
This commit is contained in:
parent
51315c0b1d
commit
e9e1959d4c
1 changed files with 3 additions and 1 deletions
|
@ -119,7 +119,9 @@ ContentFilterSettingsWidget::ContentFilterSettingsWidget()
|
||||||
|
|
||||||
m_add_new_domain_button->on_click = [&](unsigned) {
|
m_add_new_domain_button->on_click = [&](unsigned) {
|
||||||
String text;
|
String text;
|
||||||
if (GUI::InputBox::show(window(), text, "Enter domain name", "Add domain to Content Filter") == GUI::Dialog::ExecResult::OK) {
|
|
||||||
|
if (GUI::InputBox::show(window(), text, "Enter domain name", "Add domain to Content Filter") == GUI::Dialog::ExecResult::OK
|
||||||
|
&& !text.is_empty()) {
|
||||||
m_domain_list_model->add_domain(std::move(text));
|
m_domain_list_model->add_domain(std::move(text));
|
||||||
set_modified(true);
|
set_modified(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue