Commit Graph

2 Commits

Author SHA1 Message Date
SatsAllDay a7b5534b7d
check both `navigator.permissions.query` and `Notification.permission` for permissions (#655)
it seems these values are not kept in sync on iOS Safari, which may be the source
of badges not working on iOS PWA
2023-11-25 11:32:41 -06:00
SatsAllDay 522c821c89
Notification badges (#595)
* First pass of implementing Badging API for notifications

* Only show app badge when driven from push notifications

* Display number of unread push notifications instead of just an empty badge

Clear badge via postMessage when notifications page is loaded

* de-dupe some code, update badge counter on each notification click

* remove ids, track open note count instead

* restore optional chaining

* ensure note count doesn't go below 0, and fix event.waitUntil error when clearing badge

* incorporate PR feedback
2023-11-08 18:17:01 -06:00