I have been setting shouldMarkActiveChannelAsRead when the chat is hidden on the screen. This allows me to track message count while chat isn't visible. This correctly stops reading messages when the chat is not visible. But setting it back to true does not clear the read messages nor does it mark new messages as read.
constructor() {
effect(() => {
this.channelService.shouldMarkActiveChannelAsRead = this.chatVisible();
console.log(this.channelService.shouldMarkActiveChannelAsRead);
});
}
Is this the correct way to be disabling read.