mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-08-19 21:56:07 +00:00
As per feedback on PR #690: refactored if-statement.
This commit is contained in:
@@ -224,13 +224,13 @@ public class MainController implements ViewController {
|
||||
forceShutdownButtonType, forceShutdownButtonType, tryAgainButtonType);
|
||||
|
||||
Optional<ButtonType> choice = gracefulShutdownDialog.showAndWait();
|
||||
if (choice.isPresent()) {
|
||||
if (tryAgainButtonType.equals(choice.get())) {
|
||||
choice.ifPresent(btnType -> {
|
||||
if (tryAgainButtonType.equals(btnType)) {
|
||||
gracefulShutdown();
|
||||
} else if (forceShutdownButtonType.equals(choice.get())) {
|
||||
} else if (forceShutdownButtonType.equals(btnType)) {
|
||||
Platform.runLater(Platform::exit);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user