-
Notifications
You must be signed in to change notification settings - Fork 15.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Notification
with reply obscuring first action on macOS
#37381
Conversation
Notification
with reply obscuring first action on macOS
@@ -58,20 +58,25 @@ | |||
[notification_ setSoundName:base::SysUTF16ToNSString(options.sound)]; | |||
} | |||
|
|||
[notification_ setHasActionButton:false]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the default value is false - we don't need to call this explicitly.
844e85a
to
386feb4
Compare
Release Notes Persisted
|
I have automatically backported this PR to "22-x-y", please check out #37447 |
I have automatically backported this PR to "23-x-y", please check out #37448 |
I have automatically backported this PR to "24-x-y", please check out #37449 |
Description of Change
Closes #37376.
Fixes an issue where passing both
hasReply
andactions
to a main process Notification on macOS resulted in the first action being obscured and unavailable. This was happening because we calledsetHasActionButton
for the first available button, followed bysetHasReplyButton
. Per documentation, ifhasReplyButton
andhasActionButton
are both YES, the reply button is shown. This meant that the first action would be lost.We fix this by setting the reply first, and if there are actions, setting them all as additional actions.
Before
After
Tested with https://gist.github.com/bb92e0d0cf83439e176b3d970e533104
Checklist
npm test
passesRelease Notes
Notes: Fixes an issue where passing both
hasReply
andactions
to a main process Notification on macOS resulted in the first action being obscured and unavailable.