diff options
author | Claudio Cambra <claudio.cambra@gmail.com> | 2022-05-18 17:33:11 +0300 |
---|---|---|
committer | Claudio Cambra <claudio.cambra@gmail.com> | 2022-05-31 12:10:17 +0300 |
commit | 4bdfe5927051741584b86ba6c45054f0679357d4 (patch) | |
tree | e2988662405becacc7bd9ab853fc74139f15e669 | |
parent | 5636deecc60e866bde8f7abdc64adc1b8abe13df (diff) |
Fix builds on macOS versions pre-11
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 |