Browse Source

triggered updatechecker in constructor

Jan-Peter Klein 10 tháng trước cách đây
mục cha
commit
a09b55c81b

+ 2 - 3
src/main/java/org/cryptomator/ui/mainwindow/MainWindowController.java

@@ -31,7 +31,6 @@ public class MainWindowController implements FxController {
 	private final ReadOnlyObjectProperty<Vault> selectedVault;
 	private final Settings settings;
 	private final FxApplicationWindows appWindows;
-	private final UpdateChecker updateChecker;
 	private final BooleanBinding updateAvailable;
 	private final LicenseHolder licenseHolder;
 
@@ -49,15 +48,15 @@ public class MainWindowController implements FxController {
 		this.selectedVault = selectedVault;
 		this.settings = settings;
 		this.appWindows = appWindows;
-		this.updateChecker = updateChecker;
 		this.updateAvailable = updateChecker.updateAvailableProperty();
 		this.licenseHolder = licenseHolder;
+		updateChecker.automaticallyCheckForUpdatesIfEnabled();
+
 	}
 
 	@FXML
 	public void initialize() {
 		LOG.trace("init MainWindowController");
-		updateChecker.automaticallyCheckForUpdatesIfEnabled();
 
 		if (SystemUtils.IS_OS_WINDOWS) {
 			root.getStyleClass().add("os-windows");