ProtonMail / WebClients

Monorepo hosting the proton web clients
GNU General Public License v3.0
4.36k stars 555 forks source link

If user reads an email, notification about it should be removed #162

Closed bershanskiy closed 3 years ago

bershanskiy commented 4 years ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I'm always frustrated when I get an email, a notification pops up on the device, I open the email NOT via that notification on the same device and read it, and an hour later discover a stale notification. If you receive a lot of emails and read all of them in batches (multiple at time), then you can accumulate a lot of stale notifications.

Describe the solution you'd like A clear and concise description of what you want to happen.

When user opens an email, previously sent notification about that email should be removed.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Disabling notifications altogether.

Additional context Add any other context or screenshots about the feature request here.

Reproduction steps:

  1. Enable notifications and give notification permission
  2. Send yourself an email to get notified about (can be sent from the same mailbox)
  3. See a notification pop up (do NOT interact with it)
  4. Switch to the mail tab and open the email
  5. Actual result: notification persists, possibly even after you have deleted the original email Desired result: Notification is automatically dismissed, since the email was opened.

One can dismiss a notification by calling close() on it; obviously, you need to store the notification handle that you get when you register said notification in the first place.