easier-to-understand if/else for combinations of "startHidden" and "hasTrayIcon"

fixes bug when startHidden was false and hasTrayIcon was true
This commit is contained in:
Sebastian Stenzel
2022-04-01 15:36:20 +02:00
parent 887e0332da
commit 2d830cdb31

View File

@@ -61,11 +61,12 @@ public class FxApplication {
// show main window
appWindows.showMainWindow().thenAccept(stage -> {
boolean hide = settings.startHidden().get();
if (hasTrayIcon) {
stage.hide();
} else {
stage.setIconified(hide);
if (settings.startHidden().get()) {
if (hasTrayIcon) {
stage.hide();
} else {
stage.setIconified(true);
}
}
});