Explorar o código

Merge pull request #4720 from nextcloud/bugfix/pre-big-sur-compile

Use preprocessor directive rather than normal 'if' for UNNotification types
Claudio Cambra %!s(int64=3) %!d(string=hai) anos
pai
achega
3271653412
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      src/gui/systray.mm

+ 3 - 3
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