From: Claudio Cambra Date: Tue, 12 Jul 2022 09:11:44 +0000 (+0200) Subject: Use preprocessor directive rather than normal 'if' for UNNotification types X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~15^2~98^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f8d79c389c4c15c067c1318a4f831cdf46550950;p=nextcloud-desktop.git Use preprocessor directive rather than normal 'if' for UNNotification types Signed-off-by: Claudio Cambra --- 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