create separated wrapper for reload action

This commit is contained in:
yggverse 2024-11-10 10:30:10 +02:00
parent baea14de95
commit b4dee17768
16 changed files with 144 additions and 64 deletions

View file

@ -35,7 +35,6 @@ impl Browser {
action_page_home: SimpleAction,
action_page_history_back: SimpleAction,
action_page_history_forward: SimpleAction,
action_page_reload: SimpleAction,
) -> Browser {
// Init components
let action = Rc::new(Action::new());
@ -46,7 +45,6 @@ impl Browser {
action_page_home.clone(),
action_page_history_back.clone(),
action_page_history_forward.clone(),
action_page_reload.clone(),
));
// Init widget
@ -58,7 +56,6 @@ impl Browser {
action_page_home.clone(),
action_page_history_back.clone(),
action_page_history_forward.clone(),
action_page_reload.clone(),
],
));
@ -151,11 +148,6 @@ impl Browser {
}
});
action_page_reload.connect_activate({
let window = window.clone();
move |this, _| window.tab_page_reload(page_position_from_action_state(this))
});
// Return new activated `Self`
Self {
action,