mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
Respect system dark mode setting, fixes #2628
This commit is contained in:
@@ -63,8 +63,15 @@ NSString *const kThemeServiceDidChangeThemeNotification = @"kThemeServiceDidChan
|
||||
|
||||
if ([themeId isEqualToString:@"auto"])
|
||||
{
|
||||
// Translate "auto" into a theme
|
||||
themeId = UIAccessibilityIsInvertColorsEnabled() ? @"dark" : @"light";
|
||||
if (@available(iOS 13, *))
|
||||
{
|
||||
themeId = ([UITraitCollection currentTraitCollection].userInterfaceStyle == UIUserInterfaceStyleDark) ? @"dark" : @"light";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Translate "auto" into a theme
|
||||
themeId = UIAccessibilityIsInvertColorsEnabled() ? @"dark" : @"light";
|
||||
}
|
||||
}
|
||||
|
||||
if ([themeId isEqualToString:@"dark"])
|
||||
|
||||
Reference in New Issue
Block a user