mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
create separated wrapper for reload action
This commit is contained in:
parent
baea14de95
commit
b4dee17768
16 changed files with 144 additions and 64 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue