mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:27:43 +00:00
Browser: Don't add multiple page reloads to history
When reloading a page multiple times, it was also added multiple times to the history. This commit prohibits an url to be added twice in a row. Fixes #7264 Co-authored-by: Linus Groh <mail@linusgroh.de>
This commit is contained in:
parent
598d7f4127
commit
7aaef8fd4b
1 changed files with 2 additions and 0 deletions
|
@ -20,6 +20,8 @@ void History::dump() const
|
|||
|
||||
void History::push(const URL& url)
|
||||
{
|
||||
if (!m_items.is_empty() && m_items[m_current] == url)
|
||||
return;
|
||||
m_items.shrink(m_current + 1);
|
||||
m_items.append(url);
|
||||
m_current++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue