From: Claudio Cambra Date: Wed, 18 May 2022 14:33:11 +0000 (+0200) Subject: Fix builds on macOS versions pre-11 X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~15^2~178^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4bdfe5927051741584b86ba6c45054f0679357d4;p=nextcloud-desktop.git Fix builds on macOS versions pre-11 Signed-off-by: Claudio Cambra --- diff --git a/src/gui/systray.mm b/src/gui/systray.mm index e62d71258..516b4636e 100644 --- a/src/gui/systray.mm +++ b/src/gui/systray.mm @@ -18,7 +18,11 @@ Q_LOGGING_CATEGORY(lcMacSystray, "nextcloud.gui.macsystray") 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