From fc7b484c9a261283f6a786fcb0a07084f8ab6b79 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Mon, 14 Dec 2020 15:34:03 +0100 Subject: [PATCH] unwrap the Platform.runLater() statement because it is always executed on JavaFX thread --- .../ui/preferences/GeneralPreferencesController.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/main/ui/src/main/java/org/cryptomator/ui/preferences/GeneralPreferencesController.java b/main/ui/src/main/java/org/cryptomator/ui/preferences/GeneralPreferencesController.java index b1380dc0f..d17cc6a51 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/preferences/GeneralPreferencesController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/preferences/GeneralPreferencesController.java @@ -16,7 +16,6 @@ import org.slf4j.LoggerFactory; import javax.inject.Inject; import javax.inject.Named; import javafx.application.Application; -import javafx.application.Platform; import javafx.beans.property.ObjectProperty; import javafx.beans.value.ObservableValue; import javafx.fxml.FXML; @@ -90,11 +89,7 @@ public class GeneralPreferencesController implements FxController { debugModeCheckbox.selectedProperty().bindBidirectional(settings.debugMode()); - autoStartProvider.ifPresent(autoStart -> { - if (autoStart.isEnabled()) { - Platform.runLater(() -> autoStartCheckbox.setSelected(true)); - } - }); + autoStartProvider.ifPresent(realProvider -> autoStartCheckbox.setSelected(realProvider.isEnabled())); nodeOrientationLtr.setSelected(settings.userInterfaceOrientation().get() == NodeOrientation.LEFT_TO_RIGHT); nodeOrientationRtl.setSelected(settings.userInterfaceOrientation().get() == NodeOrientation.RIGHT_TO_LEFT);