From 59843fe722736679659835cd907dc000879efda1 Mon Sep 17 00:00:00 2001 From: Jan-Peter Klein Date: Tue, 13 Feb 2024 10:09:07 +0100 Subject: [PATCH] removed unnecessary dependency; utilized primitive object type --- .../java/org/cryptomator/ui/fxapp/UpdateChecker.java | 4 ++-- .../org/cryptomator/ui/fxapp/UpdateCheckerModule.java | 9 --------- .../ui/preferences/UpdatesPreferencesController.java | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/main/java/org/cryptomator/ui/fxapp/UpdateChecker.java b/src/main/java/org/cryptomator/ui/fxapp/UpdateChecker.java index 4a978a5b0..421f5937e 100644 --- a/src/main/java/org/cryptomator/ui/fxapp/UpdateChecker.java +++ b/src/main/java/org/cryptomator/ui/fxapp/UpdateChecker.java @@ -11,6 +11,7 @@ import javafx.beans.binding.BooleanBinding; import javafx.beans.property.BooleanProperty; import javafx.beans.property.ReadOnlyBooleanProperty; import javafx.beans.property.ReadOnlyStringProperty; +import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.property.StringProperty; import javafx.concurrent.ScheduledService; import javafx.concurrent.Worker; @@ -34,15 +35,14 @@ public class UpdateChecker { @Inject UpdateChecker(Settings settings, Environment env, // @Named("latestVersion") StringProperty latestVersionProperty, // - @Named("upToDate") BooleanProperty upToDate, // @Named("SemVer") Comparator semVerComparator, // ScheduledService updateCheckerService) { this.env = env; this.settings = settings; this.latestVersionProperty = latestVersionProperty; - this.upToDate = upToDate; this.semVerComparator = semVerComparator; this.updateCheckerService = updateCheckerService; + this.upToDate = new SimpleBooleanProperty(); } public void automaticallyCheckForUpdatesIfEnabled() { diff --git a/src/main/java/org/cryptomator/ui/fxapp/UpdateCheckerModule.java b/src/main/java/org/cryptomator/ui/fxapp/UpdateCheckerModule.java index 71dba5ae2..b5f06d7e5 100644 --- a/src/main/java/org/cryptomator/ui/fxapp/UpdateCheckerModule.java +++ b/src/main/java/org/cryptomator/ui/fxapp/UpdateCheckerModule.java @@ -11,8 +11,6 @@ import org.slf4j.LoggerFactory; import javax.inject.Named; import javafx.beans.binding.Bindings; import javafx.beans.binding.ObjectBinding; -import javafx.beans.property.BooleanProperty; -import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; import javafx.concurrent.ScheduledService; @@ -41,13 +39,6 @@ public abstract class UpdateCheckerModule { return new SimpleStringProperty(); } - @Provides - @Named("upToDate") - @FxApplicationScoped - static BooleanProperty provideUpToDate() { - return new SimpleBooleanProperty(); - } - @Provides @FxApplicationScoped static Optional provideHttpClient() { diff --git a/src/main/java/org/cryptomator/ui/preferences/UpdatesPreferencesController.java b/src/main/java/org/cryptomator/ui/preferences/UpdatesPreferencesController.java index bf5805814..1d8cc44c3 100644 --- a/src/main/java/org/cryptomator/ui/preferences/UpdatesPreferencesController.java +++ b/src/main/java/org/cryptomator/ui/preferences/UpdatesPreferencesController.java @@ -90,5 +90,5 @@ public class UpdatesPreferencesController implements FxController { public ReadOnlyBooleanProperty upToDateProperty(){ return upToDate;} - public Boolean getUpToDate(){ return upToDate.get();} + public boolean getUpToDate(){ return upToDate.get();} }