init last version check time to current time on first run, so that first check will be after one month

This commit is contained in:
Anton Keks 2015-09-06 23:22:30 +03:00
parent ad5dbb8874
commit 6718990a15
2 changed files with 1 additions and 2 deletions

View File

@ -46,7 +46,7 @@ public class GUIConfig {
private void load() {
isFirstRun = preferences.getBoolean("firstRun", true);
lastRunVersion = preferences.get("lastRunVersion", "Unknown");
lastVersionCheck = preferences.getLong("lastVersionCheck", 0);
lastVersionCheck = preferences.getLong("lastVersionCheck", System.currentTimeMillis());
activeFeeder = preferences.getInt("activeFeeder", 0);
displayMethod = DisplayMethod.valueOf(preferences.get("displayMethod", DisplayMethod.ALL.toString()));
showScanStats = preferences.getBoolean("showScanStats", true);

View File

@ -38,7 +38,6 @@ public class Startup {
else if (!Version.getVersion().equals(guiConfig.lastRunVersion)) {
new GoogleAnalytics().asyncReport("Update " + guiConfig.lastRunVersion + " to " + Version.getVersion());
guiConfig.lastRunVersion = Version.getVersion();
guiConfig.lastVersionCheck = System.currentTimeMillis();
}
else if (System.currentTimeMillis() - guiConfig.lastVersionCheck > 30L * 24 * 3600 * 1000) {
checkVersion.check();