From 8bba4d21fcd3da64ff0a16a11b1a947df3de240f Mon Sep 17 00:00:00 2001 From: Zorg Date: Mon, 4 Jan 2021 16:16:16 -0800 Subject: [PATCH] Fix not adding effectiveAppearance observer during merge --- Sparkle/SUUpdateAlert.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index 686af1f4..e50b013f 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -149,6 +149,15 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE { [self adaptReleaseNotesAppearance]; +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101400 + if (@available(macOS 10.14, *)) { + if (!self.observingAppearance) { + [self.webView.view addObserver:self forKeyPath:@"effectiveAppearance" options:0 context:nil]; + self.observingAppearance = YES; + } + } +#endif + // Stick a nice big spinner in the middle of the web view until the page is loaded. NSRect frame = [[self.webView.view superview] frame]; self.releaseNotesSpinner = [[NSProgressIndicator alloc] initWithFrame:NSMakeRect(NSMidX(frame) - 16, NSMidY(frame) - 16, 32, 32)];