ignore history record on same URL given

This commit is contained in:
yggverse 2024-04-13 06:09:31 +03:00
parent b092e6d9f1
commit b5fec535fb
2 changed files with 13 additions and 0 deletions

View file

@ -322,6 +322,12 @@ class Page
$url
);
// Ignore history record on same URL given
if ($url == $this->history->getCurrent())
{
$history = false;
}
// Update address field by requested
$this->address->set_text(
$url

View file

@ -37,6 +37,13 @@ class History
return isset($this->_record[$position]) ? $this->_record[$position] : null;
}
public function getCurrent(): ?string
{
return $this->get(
$this->_position
);
}
public function getBack(): ?string
{
return $this->get(