From cf0052b4f5627413ed073d44c4ef4f3df5fafa91 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Mon, 16 Feb 2026 11:07:04 +0100 Subject: [PATCH] revert lambda processing --- .../cryptomator/ui/fxapp/FxApplicationStyle.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/cryptomator/ui/fxapp/FxApplicationStyle.java b/src/main/java/org/cryptomator/ui/fxapp/FxApplicationStyle.java index 6a7ef934c..ec8967340 100644 --- a/src/main/java/org/cryptomator/ui/fxapp/FxApplicationStyle.java +++ b/src/main/java/org/cryptomator/ui/fxapp/FxApplicationStyle.java @@ -47,14 +47,12 @@ public class FxApplicationStyle { } private void appThemeChanged(@SuppressWarnings("unused") ObservableValue observable, UiTheme oldValue, UiTheme newValue) { - if (oldValue == UiTheme.AUTOMATIC && newValue != UiTheme.AUTOMATIC) { - appearanceProvider.ifPresent(service -> { - try { - service.removeListener(systemInterfaceThemeListener); - } catch (UiAppearanceException e) { - LOG.warn("Failed to disable automatic theme switching."); - } - }); + if (oldValue == UiTheme.AUTOMATIC && newValue != UiTheme.AUTOMATIC && appearanceProvider.isPresent()) { + try { + appearanceProvider.get().removeListener(systemInterfaceThemeListener); + } catch (UiAppearanceException e) { + LOG.warn("Failed to disable automatic theme switching."); + } } applyTheme(newValue); }