mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
simplify history navigation api
This commit is contained in:
parent
769ef576f6
commit
43e89716ae
3 changed files with 80 additions and 115 deletions
|
|
@ -89,28 +89,28 @@ Navbar::Navbar(
|
|||
// Actions
|
||||
void Navbar::back()
|
||||
{
|
||||
if (navbarHistory->has_memory_back())
|
||||
navbar::History::Memory match;
|
||||
|
||||
if (navbarHistory->back(match))
|
||||
{
|
||||
navbarRequest->set_text(
|
||||
navbarHistory->make_memory_back_request()
|
||||
match.request
|
||||
);
|
||||
|
||||
navbarHistory->back(); // --
|
||||
|
||||
navbarUpdate->activate();
|
||||
}
|
||||
}
|
||||
|
||||
void Navbar::forward()
|
||||
{
|
||||
if (navbarHistory->has_memory_forward())
|
||||
navbar::History::Memory match;
|
||||
|
||||
if (navbarHistory->forward(match))
|
||||
{
|
||||
navbarRequest->set_text(
|
||||
navbarHistory->make_memory_forward_request()
|
||||
match.request
|
||||
);
|
||||
|
||||
navbarHistory->forward(); // ++
|
||||
|
||||
navbarUpdate->activate();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue