Skip to content

Commit

Permalink
Use preprocessor directive rather than normal 'if' for UNNotification…
Browse files Browse the repository at this point in the history
… types

Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
  • Loading branch information
claucambra committed Jul 15, 2022
1 parent f4744eb commit 00ea2c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/systray.mm
Expand Up @@ -18,11 +18,11 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
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
Expand Down

0 comments on commit 00ea2c4

Please sign in to comment.