After migrate to latest Amity version, we made the following changes:
Old code:
suspend fun startReading(): Completable? {
val subChannelRepository: AmitySubChannelRepository = AmityChatClient.newSubChannelRepository()
return subChannelRepository.getSubChannel(channelID)
.awaitFirstOrNull()
?.startReading()
}
We follow instructions here:
New Code
fun startReading(): Completable {
val subChannelRepository: AmitySubChannelRepository = AmityChatClient.newSubChannelRepository()
return subChannelRepository.startMessageReceiptSync(channelID)
}
We made sure this line is being called first of all: AmityCoreClient.enableUnreadCount()
However, now the unread count is not updated successfully, unread count increments and never sets to 0, unless user sends a message to the same channel.
does startMessageReceiptSync really do the same as startReading()?
should we implement something else? Documentation is not clear on this aspect.
This is happening with a “Conversation Channel”