Check tray support everytime

This commit is contained in:
crschnick 2023-12-27 00:15:16 +00:00
parent 86e15cb6f2
commit 404cd744b2

View file

@ -6,6 +6,7 @@ import javafx.application.Platform;
import lombok.Getter;
import lombok.SneakyThrows;
import java.awt.*;
import java.time.Duration;
import java.time.Instant;
@ -32,6 +33,11 @@ public class AppTray {
@SneakyThrows
public void show() {
// Even though we check at startup, it seems like the support can change at runtime
if (!SystemTray.isSupported()) {
return;
}
icon.show();
}