Browse Source

ignore history record on same URL given

main
yggverse 3 months ago
parent
commit
b5fec535fb
  1. 6
      src/Entity/Tab/Page.php
  2. 7
      src/Model/History.php

6
src/Entity/Tab/Page.php

@ -322,6 +322,12 @@ class Page @@ -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

7
src/Model/History.php

@ -37,6 +37,13 @@ class History @@ -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(

Loading…
Cancel
Save