refresh proxy indication for all tabs on settings change, short local var names

This commit is contained in:
yggverse 2025-07-26 13:15:06 +03:00
parent 6d419f9234
commit 44661c5136
4 changed files with 88 additions and 61 deletions

View file

@ -15,11 +15,11 @@ use rule::Rule;
use std::rc::Rc;
pub trait Proxy {
fn proxy(profile: &Rc<Profile>) -> Self;
fn proxy(profile: &Rc<Profile>, on_close: impl Fn() + 'static) -> Self;
}
impl Proxy for adw::PreferencesDialog {
fn proxy(profile: &Rc<Profile>) -> Self {
fn proxy(profile: &Rc<Profile>, on_close: impl Fn() + 'static) -> Self {
// Init components
let ignore = Ignore::build(profile);
let misc = Misc::build(profile);
@ -98,6 +98,8 @@ impl Proxy for adw::PreferencesDialog {
.proxy
.misc
.set_highlight_request_entry(misc.is_highlight_request_entry());
on_close()
}
});
d