mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
implement page title for history records, write history on request completed only
This commit is contained in:
parent
9ce6d03644
commit
71dc5dc431
1 changed files with 16 additions and 16 deletions
|
|
@ -123,21 +123,6 @@ class Page
|
||||||
int $timeout = 5
|
int $timeout = 5
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
// Update history
|
|
||||||
if ($history)
|
|
||||||
{
|
|
||||||
// Save request in memory
|
|
||||||
$this->navbar->history->add(
|
|
||||||
$this->navbar->request->getValue()
|
|
||||||
);
|
|
||||||
|
|
||||||
// Save request in database
|
|
||||||
$this->container->browser->database->renewHistory(
|
|
||||||
$this->navbar->request->getValue(),
|
|
||||||
// @TODO title
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update title
|
// Update title
|
||||||
$this->title->set(
|
$this->title->set(
|
||||||
_('Loading...')
|
_('Loading...')
|
||||||
|
|
@ -167,7 +152,7 @@ class Page
|
||||||
// Listen response
|
// Listen response
|
||||||
\Gtk::timeout_add(
|
\Gtk::timeout_add(
|
||||||
$refresh,
|
$refresh,
|
||||||
function() use ($connection, $expire)
|
function() use ($connection, $expire, $history)
|
||||||
{
|
{
|
||||||
// Redirect requested
|
// Redirect requested
|
||||||
if ($location = $connection->getRedirect())
|
if ($location = $connection->getRedirect())
|
||||||
|
|
@ -251,6 +236,21 @@ class Page
|
||||||
// Free shared memory pool
|
// Free shared memory pool
|
||||||
$connection->close();
|
$connection->close();
|
||||||
|
|
||||||
|
// Update history
|
||||||
|
if ($history)
|
||||||
|
{
|
||||||
|
// Save request in memory
|
||||||
|
$this->navbar->history->add(
|
||||||
|
$this->navbar->request->getValue()
|
||||||
|
);
|
||||||
|
|
||||||
|
// Save request in database
|
||||||
|
$this->container->browser->database->renewHistory(
|
||||||
|
$this->navbar->request->getValue(),
|
||||||
|
$this->title->getValue()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Stop
|
// Stop
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue