draft history tab features

This commit is contained in:
yggverse 2024-04-14 17:32:50 +03:00
parent 5df6332346
commit fa92487489
5 changed files with 46 additions and 13 deletions

View file

@ -56,18 +56,7 @@ class History
);
// Build history list from database records
foreach ($this->app->database->getHistory() as $record)
{
$this->list->append(
[
$record->url,
date(
$this->config->time->format,
$record->time
)
]
);
}
$this->refresh();
// Compose page
$this->box = new \GtkBox(
@ -87,4 +76,22 @@ class History
0
);
}
public function refresh(): void
{
$this->list->clear();
foreach ($this->app->database->getHistory() as $record)
{
$this->list->append(
[
$record->url,
date(
$this->config->time->format,
$record->time
)
]
);
}
}
}