getTotalUnreadMessageCount is giving me 0 while chat list has unread chats

I make a connection to sendbird and once I get a success response I call the method: getTotalUnreadMessageCount, which it returns 0.
Problem is when I get a list of chats using GroupChannelListQuery, it gives me several chats with unread messages and sometimes it tells me the other way around: I have unread messages in getTotalUnreadMessageCount but in the chat list I don’t.

Same issue is happening sometimes in iOS.

Thanks in advance!

I’m using this version:
implementation ‘com.sendbird.sdk:uikit:2.1.5’

Hi, @RobertM
Can you explain the repeatable scenario more?!
or Can you give us the code snippets or logs?!

Hi, sorry for the late response. Really not sure what else I can share because I’m not able to share my company’s code.
Basically we had many chats and I created a custom adapter with the response GroupChannelListQuery returned. But when we called this:

SendBirdUIKit.connect((user, e) -> {
	if (e != null) {
	} else {
		SendBird.getTotalUnreadMessageCount((totalUnreadMessageCount, e1) -> {
			if (e1 == null) {
			     // here totalUnreadMessageCount is 0!

Again, sorry for not being able to write more code here, but we have some non-disclosure policies.

Thanks in advance!

Could you give me logs for getTotalUnreadMessageCount?
There is no bug for this in our sample.
Your code looks like it doesn’t have any problem.

I haven’t faced the issue for a while, we cleared all the chats and created new ones, hopefully it was just some random issue while developing the app. Do you mind if we leave this ticket open or better close it and create another one in case the issue happens again in the future?