mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-03-12 13:41:34 +00:00
pass add_history argument into the page update action
This commit is contained in:
parent
8047b6ef48
commit
0db64561f0
@ -104,15 +104,17 @@ Browser::Browser(
|
||||
// Tab page navigation actions
|
||||
add_action(
|
||||
"main_tab_page_navigation_update",
|
||||
[this]
|
||||
[this](const bool & ADD_HISTORY = false)
|
||||
{
|
||||
browserMain->tab_page_navigation_update();
|
||||
browserMain->tab_page_navigation_update(
|
||||
ADD_HISTORY
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
add_action(
|
||||
"main_tab_page_navigation_history_try_back",
|
||||
[this]
|
||||
[this]()
|
||||
{
|
||||
browserMain->tab_page_navigation_history_try_back();
|
||||
}
|
||||
|
@ -74,10 +74,12 @@ void Main::tab_close_all()
|
||||
mainTab->close_all();
|
||||
};
|
||||
|
||||
void Main::tab_page_navigation_update()
|
||||
{
|
||||
void Main::tab_page_navigation_update(
|
||||
const bool & ADD_HISTORY
|
||||
) {
|
||||
mainTab->page_navigation_update(
|
||||
mainTab->get_current_page()
|
||||
mainTab->get_current_page(),
|
||||
ADD_HISTORY
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -38,7 +38,10 @@ namespace app::browser
|
||||
void tab_close_right();
|
||||
void tab_close();
|
||||
|
||||
void tab_page_navigation_update();
|
||||
void tab_page_navigation_update(
|
||||
const bool & ADD_HISTORY
|
||||
);
|
||||
|
||||
bool tab_page_navigation_history_try_back();
|
||||
bool tab_page_navigation_history_try_forward();
|
||||
|
||||
|
@ -108,11 +108,14 @@ void Tab::close_all()
|
||||
}
|
||||
|
||||
void Tab::page_navigation_update(
|
||||
const int & PAGE_NUMBER
|
||||
const int & PAGE_NUMBER,
|
||||
const bool & ADD_HISTORY
|
||||
) {
|
||||
get_tabPage(
|
||||
PAGE_NUMBER
|
||||
)->navigation_update();
|
||||
)->navigation_update(
|
||||
ADD_HISTORY
|
||||
);
|
||||
}
|
||||
|
||||
bool Tab::page_navigation_history_try_back(
|
||||
|
@ -59,7 +59,8 @@ namespace app::browser::main
|
||||
void close_all();
|
||||
|
||||
void page_navigation_update(
|
||||
const int & PAGE_NUMBER
|
||||
const int & PAGE_NUMBER,
|
||||
const bool & ADD_HISTORY
|
||||
);
|
||||
|
||||
bool page_navigation_history_try_back(
|
||||
|
@ -234,7 +234,9 @@ void Page::navigation_update(
|
||||
"gemini://" + pageNavigation->get_request_text()
|
||||
);
|
||||
|
||||
navigation_update();
|
||||
navigation_update(
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
else
|
||||
|
@ -60,7 +60,7 @@ namespace app::browser::main::tab
|
||||
);
|
||||
|
||||
void navigation_update(
|
||||
const bool & ADD_HISTORY = false
|
||||
const bool & ADD_HISTORY
|
||||
);
|
||||
|
||||
bool navigation_history_try_back();
|
||||
|
@ -97,9 +97,9 @@ bool Navigation::history_try_back()
|
||||
match.request
|
||||
);
|
||||
|
||||
navigationUpdate->activate();
|
||||
|
||||
return true;
|
||||
return activate_action(
|
||||
"win.main_tab_page_navigation_update"
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -115,9 +115,9 @@ bool Navigation::history_try_forward()
|
||||
match.request
|
||||
);
|
||||
|
||||
navigationUpdate->activate();
|
||||
|
||||
return true;
|
||||
return activate_action(
|
||||
"win.main_tab_page_navigation_update"
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user