removed unnecessary dependency; utilized primitive object type

This commit is contained in:
Jan-Peter Klein 2024-02-13 10:09:07 +01:00
parent 3fc8541f9c
commit 59843fe722
No known key found for this signature in database
GPG Key ID: 90EDA3A7C822FD0E
3 changed files with 3 additions and 12 deletions

View File

@ -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<String> semVerComparator, //
ScheduledService<String> 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() {

View File

@ -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<HttpClient> provideHttpClient() {

View File

@ -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();}
}