Browse Source

add follow argument

CPP-GTK4
yggverse 3 months ago
parent
commit
03f0eeaf9b
  1. 8
      src/app/browser/main/tab/page/navbar/history.cpp
  2. 3
      src/app/browser/main/tab/page/navbar/history.hpp

8
src/app/browser/main/tab/page/navbar/history.cpp

@ -73,7 +73,8 @@ bool History::try_forward( @@ -73,7 +73,8 @@ bool History::try_forward(
}
void History::push(
const Glib::ustring & REQUEST
const Glib::ustring & REQUEST,
bool follow
) {
if (memory.empty() || memory.back().request != REQUEST)
{
@ -87,7 +88,10 @@ void History::push( @@ -87,7 +88,10 @@ void History::push(
}
);
index = memory.size(); // @TODO
if (follow)
{
index = memory.size();
}
}
}

3
src/app/browser/main/tab/page/navbar/history.hpp

@ -51,7 +51,8 @@ namespace app::browser::main::tab::page::navbar @@ -51,7 +51,8 @@ namespace app::browser::main::tab::page::navbar
);
void push(
const Glib::ustring & REQUEST
const Glib::ustring & REQUEST,
bool follow = true
);
void refresh();

Loading…
Cancel
Save