Simplify the isDarkModeEnabled check

This commit is contained in:
Daniel Pham 2016-03-03 23:48:30 -05:00
parent c4049cb393
commit b1eefbdcd9

View file

@ -27,7 +27,7 @@ void Browser::Show() {
} }
bool Browser::IsDarkModeEnabled() { bool Browser::IsDarkModeEnabled() {
NSString *mode = CFBridgingRelease(CFPreferencesCopyValue((CFStringRef)@"AppleInterfaceStyle", kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost)); NSString *mode = [[NSUserDefaults standardUserDefaults] stringForKey:@"AppleInterfaceStyle"];
return [mode isEqualToString: @"Dark"]; return [mode isEqualToString: @"Dark"];
} }