fixed some app theme issues

This commit is contained in:
TrueZhuanjia committed 2025-11-15 19:30:53 +08:00
1 parent 1623fc34cf
commit f23108a3ba
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -505,7 +505,7 @@ static const float REFRESH_CYCLE = 2.0f;
} }
- (bool)isDarkTheme{ - (bool)isDarkTheme{
return self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark; return ThemeManager.userInterfaceStyle == UIUserInterfaceStyleDark;
} }
- (void) updateLoop { - (void) updateLoop {
+1 -1
View File
@@ -34,10 +34,10 @@ static UIUserInterfaceStyle _userInterfaceStyle;
} }
+ (void)setUserInterfaceStyle:(UIUserInterfaceStyle)style { + (void)setUserInterfaceStyle:(UIUserInterfaceStyle)style {
_privateUserInterfaceStyle = style;
if (_userInterfaceStyle == style) { if (_userInterfaceStyle == style) {
return; return;
} }
_privateUserInterfaceStyle = style;
[ThemeManager setPublicUIStyle]; [ThemeManager setPublicUIStyle];
[[NSNotificationCenter defaultCenter] postNotificationName:ThemeDidChangeNotification object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:ThemeDidChangeNotification object:nil];
} }