New/No OP Reply system (Pull this one, not the other one) #50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds the No OP Replies system. Please test this thoroughly yourself as there's only so much testing a single person can do.
Basically all submissions are marked with the "new_flair" (if they are young enough). This MUST contain a css_class but the text can be blank if you wish it to be (so a hidden flair basically).
When an OP replies a hidden css_class is incremented. This allows the number of replies to be stored online without worrying about keeping count locally.
After a set amount of time the new tag is removed and the comment is check to see if it has more repelies than "replies_required". If so the new tag is removed (though the number of replies is still secretly counted in case you ever want to use this in another way). If not they are marked with the "no_op_replies_flair".
If marked as such, replying enough times will remove the flair.
As far as I can tell this should have 1 API call for the thread search and 2 API call per OP reply (necessary to get the submission + update the flair). So it shouldn't be too bad.