瀏覽代碼

triggered updatechecker in constructor

Jan-Peter Klein 10 月之前
父節點
當前提交
a09b55c81b
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      src/main/java/org/cryptomator/ui/mainwindow/MainWindowController.java

+ 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");