Merge pull request #11654 from sethlu/set-notification-close-button-text
feat: Set macOS notification close button title
This commit is contained in:
commit
af92b04eb9
6 changed files with 133 additions and 21 deletions
|
@ -88,6 +88,10 @@ void CocoaNotification::Show(const NotificationOptions& options) {
|
|||
[notification_ setHasReplyButton:true];
|
||||
}
|
||||
|
||||
if (!options.close_button_text.empty()) {
|
||||
[notification_ setOtherButtonTitle:base::SysUTF16ToNSString(options.close_button_text)];
|
||||
}
|
||||
|
||||
[NSUserNotificationCenter.defaultUserNotificationCenter
|
||||
deliverNotification:notification_];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue