Show expired entries on DB unlock

* Show banner message about expired entries
* Add config option and expiration offset
* Only show expiry warning on first DB unlock
* Default to on with 3-day offset from expiration
This commit is contained in:
Balazs Gyurak 2022-01-22 18:20:41 +00:00 committed by Jonathan White
parent 3c824cb500
commit 6897787d8f
9 changed files with 145 additions and 1 deletions

View file

@ -441,7 +441,12 @@ int Entry::size() const
bool Entry::isExpired() const
{
return m_data.timeInfo.expires() && m_data.timeInfo.expiryTime() < Clock::currentDateTimeUtc();
return willExpireInDays(0);
}
bool Entry::willExpireInDays(int days) const
{
return m_data.timeInfo.expires() && m_data.timeInfo.expiryTime() < Clock::currentDateTime().addDays(days);
}
bool Entry::isRecycled() const