diff --git a/src/main/java/org/cryptomator/common/settings/Settings.java b/src/main/java/org/cryptomator/common/settings/Settings.java index 6bfd03e3c..f17a1f802 100644 --- a/src/main/java/org/cryptomator/common/settings/Settings.java +++ b/src/main/java/org/cryptomator/common/settings/Settings.java @@ -168,7 +168,6 @@ public class Settings { } }); } - } SettingsJson serialized() { diff --git a/src/main/java/org/cryptomator/ui/fxapp/UpdateChecker.java b/src/main/java/org/cryptomator/ui/fxapp/UpdateChecker.java index 3321128b8..32267f27c 100644 --- a/src/main/java/org/cryptomator/ui/fxapp/UpdateChecker.java +++ b/src/main/java/org/cryptomator/ui/fxapp/UpdateChecker.java @@ -19,11 +19,7 @@ import javafx.concurrent.Worker; import javafx.concurrent.WorkerStateEvent; import javafx.util.Duration; import java.time.Instant; -import java.time.LocalDateTime; -import java.time.ZoneId; import java.util.Comparator; -import java.util.Date; -import java.util.ResourceBundle; @FxApplicationScoped public class UpdateChecker { @@ -37,7 +33,6 @@ public class UpdateChecker { private final ScheduledService updateCheckerService; private final ObjectProperty state = new SimpleObjectProperty<>(UpdateCheckState.NOT_CHECKED); private final ObjectProperty lastSuccessfulUpdateCheck = new SimpleObjectProperty<>(); - private final StringProperty timeDifferenceMessage = new SimpleStringProperty(); private final Comparator versionComparator = new SemVerComparator(); private final BooleanBinding updateAvailable; diff --git a/src/main/java/org/cryptomator/ui/preferences/UpdatesPreferencesController.java b/src/main/java/org/cryptomator/ui/preferences/UpdatesPreferencesController.java index 0d54a91c3..2c2cf5425 100644 --- a/src/main/java/org/cryptomator/ui/preferences/UpdatesPreferencesController.java +++ b/src/main/java/org/cryptomator/ui/preferences/UpdatesPreferencesController.java @@ -49,6 +49,7 @@ public class UpdatesPreferencesController implements FxController { private final BooleanBinding updateAvailable; private final BooleanProperty upToDateLabelVisible = new SimpleBooleanProperty(false); private final ObjectProperty updateCheckState; + private final DateTimeFormatter formatter; /* FXML */ public CheckBox checkForUpdatesCheckbox; @@ -69,6 +70,7 @@ public class UpdatesPreferencesController implements FxController { this.currentVersion = updateChecker.getCurrentVersion(); this.updateAvailable = updateChecker.updateAvailableProperty(); this.updateCheckState = updateChecker.updateCheckStateProperty(); + this.formatter = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM).withLocale(Locale.getDefault()); } public void initialize() { @@ -130,7 +132,6 @@ public class UpdatesPreferencesController implements FxController { public String getLastSuccessfulUpdateCheck() { Instant lastCheck = lastSuccessfulUpdateCheck.getValue(); if (lastCheck != null && !lastCheck.equals(Settings.DEFAULT_LAST_SUCCESSFUL_UPDATE_CHECK)) { - DateTimeFormatter formatter = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM).withLocale(Locale.getDefault()); return formatter.format(LocalDateTime.ofInstant(lastCheck, ZoneId.systemDefault())); } else { return "-"; diff --git a/src/main/java/org/cryptomator/ui/updatereminder/UpdateReminderComponent.java b/src/main/java/org/cryptomator/ui/updatereminder/UpdateReminderComponent.java index c59294a6e..ffd127451 100644 --- a/src/main/java/org/cryptomator/ui/updatereminder/UpdateReminderComponent.java +++ b/src/main/java/org/cryptomator/ui/updatereminder/UpdateReminderComponent.java @@ -5,21 +5,16 @@ import dagger.Subcomponent; import org.cryptomator.common.settings.Settings; import org.cryptomator.ui.common.FxmlFile; import org.cryptomator.ui.common.FxmlScene; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import javafx.scene.Scene; import javafx.stage.Stage; import java.time.Duration; import java.time.Instant; -import java.util.Date; @UpdateReminderScoped @Subcomponent(modules = {UpdateReminderModule.class}) public interface UpdateReminderComponent { - Logger LOG = LoggerFactory.getLogger(UpdateReminderComponent.class); - @UpdateReminderWindow Stage window();