Skip to content
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: reply notifs sometimes destroyed too early #25086

Merged
merged 2 commits into from Aug 24, 2020

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Aug 21, 2020

Description of Change

Closes #25062.

Fixes an issue where notifications with a reply button could potentially be destroyed too early when a user clicked on the notification body before replying, which meant that when they did finally reply the reply callback would never be called. This happened because we were destroying the notification on any activation type, and it's possible for reply-type notifications to be activated more than once. This fixes that by ensuring that reply-type notifications are only destroyed when the activation type is NSUserNotificationActivationTypeReplied.

Tested with https://gist.github.com/60a2cff9d13903bf538ebfc3c8134f0f.

cc @MarshallOfSound @zcbenz

Checklist

Release Notes

Notes: Fixed an issue where notifications with a reply button could potentially be destroyed too early when a user clicked on the notification body before replying.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Aug 21, 2020
Copy link
Member

@nornagon nornagon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the user never clicks reply? will the notif live forever?

@codebytere
Copy link
Member Author

@nornagon same behavior as a non-reply notification which is not directly interacted with - it disappears from view on its own.

@codebytere codebytere force-pushed the fix-notifications-getting-lost branch from 1d25210 to 1609a7d Compare August 21, 2020 21:48
@codebytere codebytere force-pushed the fix-notifications-getting-lost branch from 7cc50ae to c1770ef Compare August 22, 2020 04:52
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Aug 22, 2020
@codebytere codebytere merged commit bea6c9e into master Aug 24, 2020
@release-clerk
Copy link

release-clerk bot commented Aug 24, 2020

Release Notes Persisted

Fixed an issue where notifications with a reply button could potentially be destroyed too early when a user clicked on the notification body before replying.

@trop
Copy link
Contributor

trop bot commented Aug 24, 2020

I have automatically backported this PR to "10-x-y", please check out #25100

@trop
Copy link
Contributor

trop bot commented Aug 24, 2020

I have automatically backported this PR to "9-x-y", please check out #25101

@trop
Copy link
Contributor

trop bot commented Aug 24, 2020

I have automatically backported this PR to "8-x-y", please check out #25102

MarshallOfSound added a commit that referenced this pull request Sep 1, 2020
zcbenz pushed a commit that referenced this pull request Sep 2, 2020
* Revert "fix: reply notifs sometimes destroyed too early (#25086)"

This reverts commit bea6c9e.

* nothing
MarshallOfSound added a commit that referenced this pull request Oct 23, 2020
* Revert "fix: reply notifs sometimes destroyed too early (#25086)"

This reverts commit bea6c9e.

* nothing
MarshallOfSound added a commit that referenced this pull request Oct 23, 2020
…26131)

* Revert "fix: reply notifs sometimes destroyed too early (#25086)"

This reverts commit bea6c9e.

* nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notification reply stop working after click on notification
4 participants