I'm trying to figure out how the DicussionListItem-count works. In a discussion I read:
The number of posts shown on the homepage is the total of public, non-deleted comments. This value is cached for performance and is the same for all users.
The number of posts shown in the scrubber at the right of the discussion is the total number of posts your user can see in this discussion, which can include deleted posts and will include event posts if there are any. This value is not cached and will differ for each user. https://discuss.flarum.org/d/24228-inconsistent-discussion-posts-count/6
I have an issue where an unread discussion has a count of 29 in the discussion list but when I enter it, it only has 8 posts in the scrubber. Then I go to the discussion list again and the count says 6. In the database, comment_count for the discussion is 7 and the post_number_index is 29.
When looking at the data, it seems that it sets the count to post_number_index instead of comment_count on unread discussions. If this is true, is it by design?
Can someone elaborate on it?