From f8d79c389c4c15c067c1318a4f831cdf46550950 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Tue, 12 Jul 2022 11:11:44 +0200 Subject: [PATCH] Use preprocessor directive rather than normal 'if' for UNNotification types Signed-off-by: Claudio Cambra --- src/gui/systray.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/systray.mm b/src/gui/systray.mm index 516b4636e..8798e125e 100644 --- a/src/gui/systray.mm +++ b/src/gui/systray.mm @@ -18,11 +18,11 @@ Q_LOGGING_CATEGORY(lcMacSystray, "nextcloud.gui.macsystray") willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler { - if (@available(macOS 11.0, *)) { +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000 completionHandler(UNNotificationPresentationOptionSound + UNNotificationPresentationOptionBanner); - } else { +#else completionHandler(UNNotificationPresentationOptionSound + UNNotificationPresentationOptionAlert); - } +#endif } - (void)userNotificationCenter:(UNUserNotificationCenter *)center -- 2.39.5