-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Cannot get unread count per channel #1104
Comments
FWIW, I managed to get the unread count per channel by doing this:
it works, but feels like a workaround rather than a feature. I'd prefer not having to watch the channel |
I logged a similar issue recently if maintainers see this GetStream/stream-chat-react-native#2635 (Thank you for sharing your workaround) |
@MaxAst do you mind sharing your |
I'm a bit worried as to why there hasn't been a reaction by the maintainers yet.. considering it's a core feature of a paid product 🤷 |
@santhoshvai |
Closing this in favour of #1119 |
I have a list where each list item component has the following useEffect:
When another channel member sends a message into the given channel,
channel.countUnread()
returns 0 and the event listener contains the user's total unreads on both fields,total_unread_count
andunread_count
. I would have expected the latter to be the unread count for only the given channel. So I guess two things are broken:channel.countUnread()
always returns 0 when the list item component mounts, even when thetotal_unread_count
andunread_count
are greater than 0 (I also verified that it can't be 0 by logging this at the beginning of the useEffect body:console.log(JSON.stringify(chatClient.user, null, 2));
, which returnedtotal_unread_count
andunread_count
greater than 0)total_unread_count
andunread_count
both return the unread count across all channels instead ofunread_count
only returning the unread of the given channelThe text was updated successfully, but these errors were encountered: