Avoid checking appearance by name, use bestMatchFromAppearancesWithNames for future-proofing.

This commit is contained in:
Michel Fortin committed 2018-09-15 09:47:37 -04:00
1 parent 3ed5f3875b
commit 077e2b155f
1 file changed
+2 -1
+2 -1
View File
@@ -253,7 +253,8 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE
if (@available(macOS 10.14, *))
{
WebPreferences *prefs = [self.releaseNotesView preferences];
if ([self.releaseNotesView effectiveAppearance].name == NSAppearanceNameDarkAqua || [self.releaseNotesView effectiveAppearance].name == NSAppearanceNameAccessibilityHighContrastDarkAqua)
NSAppearanceName bestAppearance = [self.releaseNotesView.effectiveAppearance bestMatchFromAppearancesWithNames:@[NSAppearanceNameAqua, NSAppearanceNameDarkAqua]];
if ([bestAppearance isEqualToString:NSAppearanceNameDarkAqua])
{
// Set user stylesheet adapted to light on dark
prefs.userStyleSheetEnabled = YES;