cleanup expired history records in the history constructor

This commit is contained in:
yggverse 2024-04-17 10:18:13 +03:00
parent 313c6b6db5
commit 704a534401
2 changed files with 13 additions and 2 deletions

View file

@ -33,6 +33,14 @@ class History
// Init config
$this->config = \Yggverse\Yoda\Model\File::getConfig()->app->tab->history;
// Cleanup expired history
if ($this->config->clean->timeout)
{
$this->app->database->cleanHistory(
$this->config->clean->timeout
);
}
// Compose header
$this->header = new \GtkBox(
\GtkOrientation::HORIZONTAL