mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-19 21:55:13 +00:00
Avoid deprecation warning from Apple
Apparently Apple invent half-assed language extensions like @available and then dont implement them properly
This commit is contained in:
parent
ae6318cb5a
commit
889f2fce6d
1 changed files with 2 additions and 2 deletions
|
|
@ -230,8 +230,8 @@ cocoa_send_notification(PyObject *self UNUSED, PyObject *args) {
|
|||
willPresentNotification:(UNNotification *)notification
|
||||
withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler {
|
||||
UNNotificationPresentationOptions options = UNNotificationPresentationOptionSound;
|
||||
if(@available(macOS 11.0, *)) options |= UNNotificationPresentationOptionList | UNNotificationPresentationOptionBanner;
|
||||
else options |= UNNotificationPresentationOptionAlert;
|
||||
if (@available(macOS 11.0, *)) options |= UNNotificationPresentationOptionList | UNNotificationPresentationOptionBanner;
|
||||
else options |= (1 << 2); // UNNotificationPresentationOptionAlert avoid deprecated warning
|
||||
completionHandler(options);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue