Fixes #2083 - Expose options for overriding the system appearance in the advanced settings menu

This commit is contained in:
Stefan Ceriu
2023-11-15 10:48:00 +02:00
committed by Stefan Ceriu
parent 0cbba1b04c
commit a846c30305
11 changed files with 106 additions and 22 deletions

View File

@@ -167,6 +167,14 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
AnyView(
navigationRootCoordinator.toPresentable()
.environment(\.analyticsService, ServiceLocator.shared.analytics)
.onReceive(appSettings.$appAppearance) { [weak self] appAppearance in
guard let self else { return }
windowManager.windows.forEach { window in
// Unfortunately .preferredColorScheme doesn't propagate properly throughout the app when changed
window.overrideUserInterfaceStyle = appAppearance.interfaceStyle
}
}
)
}