Clear notifications about new mail once it's been read

The Problem

As discussed in this support thread, other mail clients I’ve used typically clear the OS notification about a new email arriving once it’s been read, whereas Mailspring doesn’t. That means they need clearing manually, otherwise the number will just keep increasing every time new mail arrives without ever going back down again, which just makes it harder to tell when anything arrives.

Proposed Solution

Clear the notification for an email once it’s been read. I’m not sure which library’s used to send the notification to the OS, but OS APIs let notifications be cancelled, so presumably the library wrapping this can expose that feature.

Alternative Solutions

A timeout would clear notifications eventually, but could lead to notifications being cleared before a message is read or notifications persisting long after a message is read, so then the number would have even less relation to the number of unread messages than it already does.

Context

It suggests describing the implementation in other email clients, but it’s just what I’ve said above - they clear the notification about a message arriving once the message has been read.