#Bug: Clicking primary button in notification creates unread count server-client mismatch

1 messages · Page 1 of 1 (latest)

finite lake
#

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

novel burrow
#

@finite lake
This looks like a bug. Sharing it with the team