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 12, 2022
1 parent 85f5bbd commit 132fef1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/systray.mm
Original file line number Diff line number Diff line change
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 132fef1

Please sign in to comment.