浏览代码

Merge branch 'develop' into feature/installers

Sebastian Stenzel 3 年之前
父节点
当前提交
fd4bd66ac4

+ 6 - 3
src/main/java/org/cryptomator/ui/fxapp/FxApplication.java

@@ -188,9 +188,12 @@ public class FxApplication extends Application {
 	}
 
 	private void applySystemTheme() {
-		appearanceProvider.ifPresent(appearanceProvider -> {
-			systemInterfaceThemeChanged(appearanceProvider.getSystemTheme());
-		});
+		if (appearanceProvider.isPresent()) {
+			systemInterfaceThemeChanged(appearanceProvider.get().getSystemTheme());
+		} else {
+			LOG.warn("No UiAppearanceProvider present, assuming LIGHT theme...");
+			applyLightTheme();
+		}
 	}
 
 	private void applyLightTheme() {

+ 1 - 1
src/main/java/org/cryptomator/ui/preferences/GeneralPreferencesController.java

@@ -224,7 +224,7 @@ public class GeneralPreferencesController implements FxController {
 			if (string == null) {
 				return null;
 			} else {
-				return keychainAccessProviders.stream().filter(provider -> provider.getClass().getName().equals(string)).findAny().orElseThrow();
+				return keychainAccessProviders.stream().filter(provider -> provider.getClass().getName().equals(string)).findAny().orElse(null);
 			}
 		}
 	}