logic: Start automatic update checks on second day of use

* Added status messages for update check
This commit is contained in:
Eberhard Graether
2019-04-23 14:28:56 +02:00
parent 76aed77f59
commit 550ce9c7df
3 changed files with 25 additions and 10 deletions
+8
View File
@@ -415,6 +415,14 @@ void Application::loadWindow(bool showStartWindow)
if (!m_loadedWindow)
{
ApplicationSettings* appSettings = ApplicationSettings::getInstance().get();
// delay first update check by 24 hours at first launch
if (!appSettings->getLastUpdateCheck().isValid())
{
appSettings->setLastUpdateCheck(TimeStamp::now());
appSettings->save();
}
LicenseChecker::LicenseState state = LicenseChecker::LicenseState::VALID;
std::string licenseError;
+1 -7
View File
@@ -546,13 +546,7 @@ void ApplicationSettings::setAutomaticUpdateCheck(bool automaticUpdates)
TimeStamp ApplicationSettings::getLastUpdateCheck() const
{
std::string val = getValue<std::string>("user/update_check/time_stamp", "");
if (!val.size())
{
val = getValue<std::string>("user/update_check/last", ""); // deprecated key
}
return TimeStamp(val);
return TimeStamp(getValue<std::string>("user/update_check/time_stamp", ""));
}
void ApplicationSettings::setLastUpdateCheck(const TimeStamp& time)