mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-28 11:11:47 +02: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:
@@ -231,7 +231,7 @@ cocoa_send_notification(PyObject *self UNUSED, PyObject *args) {
|
|||||||
withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler {
|
withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler {
|
||||||
UNNotificationPresentationOptions options = UNNotificationPresentationOptionSound;
|
UNNotificationPresentationOptions options = UNNotificationPresentationOptionSound;
|
||||||
if (@available(macOS 11.0, *)) options |= UNNotificationPresentationOptionList | UNNotificationPresentationOptionBanner;
|
if (@available(macOS 11.0, *)) options |= UNNotificationPresentationOptionList | UNNotificationPresentationOptionBanner;
|
||||||
else options |= UNNotificationPresentationOptionAlert;
|
else options |= (1 << 2); // UNNotificationPresentationOptionAlert avoid deprecated warning
|
||||||
completionHandler(options);
|
completionHandler(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user