-
-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unread comments count and number of comments don't match #136
Comments
OK, I'll go with option 1 coz it's required regardless (ie: to handle deleted comments count). But I think decoupling actions from comments would be really cool, so they don't count as page items. Also, styling them ala github would be great! |
Will deleted comments not count towards the comment count any more? If so, could we also add an option to not show them in the topic at all? |
Not sure, but probably.
Nop. That would break notifications and the bookmarking. |
Just checked, the bookmark can be updated to So it can be done. It adds a bunch of complexity though. IMHO, the only upside of doing this is so deleted comments are not page items, but other than that I don't see why it would be a good idea. |
We could just skip them whle rendering, maybe that's what you meant. That can be done. |
That'w what I do but then the count and pagination is off. |
I meant literally skip them while rendering (ie: If you filter them out in the database query, that will break many things. |
Yeah, it works ok-ish with just hiding them. Anyway, any chance of fixing the count issue? |
Yes, I will try to get it done this soon. |
Basically, topic's actions (topic pinned, etc) are not being counted as comments and that is ok, but... actions are actually comments and that creates some issues.
The unread comments count (the red highlighting when there's a new comment) feature relies on the bookmark and the comment count, it does something like (
comments_count
-bookmark.comment_number
) to calculate if there is a new comment. When there is an action posted, thebookmark.comment_number
will be greater thancomments_count
, so the next new comment won't be counted as unread.There are three ways of fixing this thing: 1. add a
post_count
field to track all kind of posts (comments and actions) and calculate the unread count (something likeactions_count
won't quite work: see #131) or 2. make the unread comments count an app (ie: extra join to aOneToOne
table) or 3. decouple actions from comments somehow (still requires apost_count
field to handle deleted comments).👍 to option 1.
Reported by @alesdotio here.
The text was updated successfully, but these errors were encountered: