The problem is that when the topic is moved to the recycle board, maxMsgID is updated to the last message id excluding the recycle board, so when the mark as read button is used in the recycle board before another post is made, the recycle board is marked as unread.
The question is why the maxMsgID is changed when a post is deleted?
It's almost useless because anyway the new id_msg (and so id_last_msg) will always be higher then the previous one...am I wrong?