mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-21 20:21:27 +00:00
log inconsistent state
This commit is contained in:
@@ -72,14 +72,15 @@ public class FxApplicationStyle {
|
||||
}
|
||||
|
||||
private void registerAutomaticThemeChange() {
|
||||
appearanceProvider.ifPresent(provider -> {
|
||||
try {
|
||||
provider.addListener(systemInterfaceThemeListener);
|
||||
} catch (UiAppearanceException e) {
|
||||
LOG.error("Failed to enable automatic theme switching.");
|
||||
}
|
||||
systemInterfaceThemeChanged(provider.getSystemTheme());
|
||||
});
|
||||
appearanceProvider.ifPresentOrElse(provider -> {
|
||||
try {
|
||||
provider.addListener(systemInterfaceThemeListener);
|
||||
} catch (UiAppearanceException e) {
|
||||
LOG.error("Failed to enable automatic theme switching.");
|
||||
}
|
||||
systemInterfaceThemeChanged(provider.getSystemTheme());
|
||||
}, //
|
||||
() -> LOG.warn("UI theme AUTOMATIC selected, but no supported UiAppearanceProvider present"));
|
||||
}
|
||||
|
||||
private void systemInterfaceThemeChanged(Theme osTheme) {
|
||||
|
||||
Reference in New Issue
Block a user