Issue #713 Installer downloading of parts like SWC file can be skipped

moving auto update check to separate thread for faster loading
This commit is contained in:
Jindra Petřík
2014-11-12 10:33:20 +01:00
parent 1f0d6d9619
commit 6a03ca713c
4 changed files with 33 additions and 24 deletions

View File

@@ -1250,7 +1250,15 @@ public class Main {
if (Configuration.checkForUpdatesAuto.get()) {
Calendar lastUpdatesCheckDate = Configuration.lastUpdatesCheckDate.get();
if ((lastUpdatesCheckDate == null) || (lastUpdatesCheckDate.getTime().getTime() < Calendar.getInstance().getTime().getTime() - Configuration.checkForUpdatesDelay.get())) {
checkForUpdates();
new SwingWorker(){
@Override
protected Object doInBackground() throws Exception {
checkForUpdates();
return null;
}
}.execute();
System.out.println("finished");
}
}
}