Skip to content

Commit

Permalink
Merge pull request #4563 from nextcloud/bugfix/pre-bigsur-build-fix
Browse files Browse the repository at this point in the history
Fix build on macOS versions pre-11 (down to 10.14)
  • Loading branch information
claucambra authored May 31, 2022
2 parents 5636dee + 4bdfe59 commit 87ebd3f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gui/systray.mm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
willPresentNotification:(UNNotification *)notification
withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
{
completionHandler(UNNotificationPresentationOptionSound + UNNotificationPresentationOptionBanner);
if (@available(macOS 11.0, *)) {
completionHandler(UNNotificationPresentationOptionSound + UNNotificationPresentationOptionBanner);
} else {
completionHandler(UNNotificationPresentationOptionSound + UNNotificationPresentationOptionAlert);
}
}

- (void)userNotificationCenter:(UNUserNotificationCenter *)center
Expand Down

0 comments on commit 87ebd3f

Please sign in to comment.