mirror of
https://github.com/electron/electron.git
synced 2026-01-29 09:18:18 -05:00
NSUserNotification should respond
NSUserNotification is expected to responsd to `@selector(setContentImage:)` with macOS ^10.9
This commit is contained in:
@@ -41,8 +41,7 @@ void CocoaNotification::Show(const NotificationOptions& options) {
|
||||
LOG(INFO) << "Notification created (" << [identifier UTF8String] << ")";
|
||||
}
|
||||
|
||||
if ([notification_ respondsToSelector:@selector(setContentImage:)] &&
|
||||
!options.icon.drawsNothing()) {
|
||||
if (!options.icon.drawsNothing()) {
|
||||
NSImage* image = skia::SkBitmapToNSImageWithColorSpace(
|
||||
options.icon, base::mac::GetGenericRGBColorSpace());
|
||||
[notification_ setContentImage:image];
|
||||
|
||||
Reference in New Issue
Block a user