removed lastUpdateReminder setting

This commit is contained in:
Jan-Peter Klein
2024-05-08 09:05:26 +02:00
parent 1581a10c04
commit 7ab64cfe46
4 changed files with 1 additions and 8 deletions

View File

@@ -67,7 +67,6 @@ public class Settings {
public final IntegerProperty windowHeight;
public final StringProperty language;
public final StringProperty mountService;
public final ObjectProperty<Instant> lastUpdateReminder;
public final ObjectProperty<Instant> lastSuccessfulUpdateCheck;
private Consumer<Settings> saveCmd;

View File

@@ -82,10 +82,6 @@ class SettingsJson {
@JsonProperty(value = "preferredVolumeImpl", access = JsonProperty.Access.WRITE_ONLY) // WRITE_ONLY means value is "written" into the java object during deserialization. Upvote this: https://github.com/FasterXML/jackson-annotations/issues/233
String preferredVolumeImpl;
@JsonProperty("lastUpdateReminder")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'", timezone = "UTC")
Instant lastUpdateReminder = Settings.DEFAULT_TIMESTAMP;
@JsonProperty("lastSuccessfulUpdateCheck")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'", timezone = "UTC")
Instant lastSuccessfulUpdateCheck = Settings.DEFAULT_TIMESTAMP;

View File

@@ -36,7 +36,6 @@ public class UpdateChecker {
private final ObjectProperty<Instant> lastSuccessfulUpdateCheck = new SimpleObjectProperty<>();
private final Comparator<String> versionComparator = new SemVerComparator();
private final ObservableValue<Boolean> updateAvailable;
//private final BooleanBinding checkFailed;
private final ObservableValue<Boolean> checkFailed;
@Inject

View File

@@ -26,8 +26,7 @@ public interface UpdateReminderComponent {
default void checkAndShowUpdateReminderWindow() {
var now = Instant.now();
var twoWeeksAgo = now.minus(Duration.ofDays(14));
if (settings().lastUpdateReminder.get().isBefore(twoWeeksAgo) && !settings().checkForUpdates.getValue() && settings().lastSuccessfulUpdateCheck.get().isBefore(twoWeeksAgo)) {
settings().lastUpdateReminder.set(now);
if (!settings().checkForUpdates.getValue() && settings().lastSuccessfulUpdateCheck.get().isBefore(twoWeeksAgo)) {
Stage stage = window();
stage.setScene(updateReminderScene().get());
stage.sizeToScene();