stream-chat-js icon indicating copy to clipboard operation
stream-chat-js copied to clipboard

fix: align unread counting on muted channel

Open arnautov-anton opened this issue 1 year ago • 1 comments

Description of the changes, What, Why and How?

Few weeks ago we received a GH issue where integrator mentions, that muting a channel with unread count > 0 will reset unread count to zero - while that is not the case, the issue they described further still stands and that is when the state gets actually reset (upon unmuting said channel) and the page is reloaded (re-query the channels), the unread count is back where it was prior to muting/unmuting.

This PR removes condition from unread counting function and removes state resetting in the notification.channel_mutes_updated handler. That way when the channel is unmuted the unread count represents actual value which would match the one received from the channel when re-queried.

TODO

  • [ ] add tests

arnautov-anton avatar Mar 15 '24 10:03 arnautov-anton

Size Change: -560 B (0%)

Total Size: 352 kB

Filename Size Change
dist/browser.es.js 76 kB -132 B (0%)
dist/browser.full-bundle.min.js 46.3 kB -94 B (0%)
dist/browser.js 77 kB -98 B (0%)
dist/index.es.js 76 kB -136 B (0%)
dist/index.js 77 kB -100 B (0%)

compressed-size-action

github-actions[bot] avatar Mar 15 '24 10:03 github-actions[bot]