mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-04-17 16:16:52 -04:00
removed lastUpdateReminder setting
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user