logic: Start automatic update checks on second day of use
* Added status messages for update check
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user