When clicking the the primary action button in a notification the unread indicator in the notification itself is removed (indicating that it has been read). However, the count of unread notifications on the bell-icon is not updated.
Why:
The useCount hook listens on the WS-event UNREAD_COUNT_CHANGED. When the event is received, the client will call the count endpoint, syncing the client state with the server state. However, when clicking the primary button the UNREAD_COUNT_CHANGED is never sent to the client. This seems like a bug.
Workaround:
Call notification.read() in the onPrimaryActionClick-callback