mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-18 18:51:26 +00:00
some code cleanup
This commit is contained in:
@@ -69,7 +69,7 @@ public class FxApplication {
|
||||
return null;
|
||||
});
|
||||
|
||||
if(LocalDate.parse(settings.lastUpdateCheck.get()).isBefore(LocalDate.now().minusDays(14)) && !settings.checkForUpdates.getValue()){
|
||||
if (LocalDate.parse(settings.lastUpdateCheck.get()).isBefore(LocalDate.now().minusDays(14)) && !settings.checkForUpdates.getValue()) {
|
||||
appWindows.showUpdateReminderWindow();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import org.cryptomator.ui.lock.LockComponent;
|
||||
import org.cryptomator.ui.mainwindow.MainWindowComponent;
|
||||
import org.cryptomator.ui.preferences.PreferencesComponent;
|
||||
import org.cryptomator.ui.quit.QuitComponent;
|
||||
|
||||
import org.cryptomator.ui.traymenu.TrayMenuComponent;
|
||||
import org.cryptomator.ui.unlock.UnlockComponent;
|
||||
import org.cryptomator.ui.updatereminder.UpdateReminderComponent;
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2017 Skymatic UG (haftungsbeschränkt).
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the accompanying LICENSE file.
|
||||
*******************************************************************************/
|
||||
package org.cryptomator.ui.updatereminder;
|
||||
|
||||
import dagger.Lazy;
|
||||
|
||||
@@ -7,7 +7,6 @@ import org.cryptomator.ui.fxapp.UpdateChecker;
|
||||
import javax.inject.Inject;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
@@ -31,12 +30,14 @@ public class UpdateReminderController implements FxController {
|
||||
settings.lastUpdateCheck.set(LocalDate.now().format(DateTimeFormatter.ISO_DATE));
|
||||
window.close();
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void once() {
|
||||
settings.lastUpdateCheck.set(LocalDate.now().format(DateTimeFormatter.ISO_DATE));
|
||||
updateChecker.checkForUpdatesNow();
|
||||
window.close();
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void automatically() {
|
||||
settings.lastUpdateCheck.set(LocalDate.now().format(DateTimeFormatter.ISO_DATE));
|
||||
|
||||
Reference in New Issue
Block a user