diff options
author | Claudio Cambra <claudio.cambra@gmail.com> | 2022-05-18 17:33:11 +0300 |
---|---|---|
committer | Matthieu Gallien <matthieu_gallien@yahoo.fr> | 2022-06-01 13:41:29 +0300 |
commit | eb95facfd4a3d0c90581bfb0c613e80cf481425f (patch) | |
tree | 6bfcb4feccd05d3f4f2f357ed77591fcce4f965f | |
parent | a13b32ec93fc543a82eb1b8e6feabf7b360b4582 (diff) |
Fix builds on macOS versions pre-11backport/4563/stable-3.5
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
-rw-r--r-- | src/gui/systray.mm | 6 |
1 files changed, 5 insertions, 1 deletions
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 |