Ignore unread count while chatting

What is the correct way to ignore unread count increment while on Chat message UI (receiving messages).

  1. Calling startMessageReceiptSync / stopMessageReceiptSync
  2. channel.markAsRead(); after leaving channel?
  3. message.markRead(); each message in collection or the last one?

Note: calling startMessageReceiptSync when on chant screen and stopMessageReceiptSync when leaving chat screen does not seem to work?

Hello, just to clarify my understanding - you don’t want to see the unread message count when you are actively in that particular chat?

Yes, what happens is I’m in the chat screen UI and having a conversation (receiving & replying to messages). Once, I exit the chat, all the messages from that conversation counted towards unread message count. Hence, I want to ignore the count during that period and only have the count incremented when I’m away from the chat screen UI.

Hello, thank you for the explanation. For further information, please refer to this section: Observe reading count | Amity Docs.

If this doesn’t address your needs, kindly let us know.