comments.js: fix thresholded comments.
* Restore behavior of thresholded comments being greyed out (lost in 6fa0ae2cf).
* Set the `below-threshold` class for thresholded comments in the html instead of in javascript.
* Remove `include_below_threshold` param; it was always true when clicking "Show all comments".
This commit is contained in:
@@ -189,6 +189,10 @@ class Comment < ApplicationRecord
|
||||
true
|
||||
end
|
||||
|
||||
def below_threshold?(user = CurrentUser.user)
|
||||
score < user.comment_threshold
|
||||
end
|
||||
|
||||
def editable_by?(user)
|
||||
creator_id == user.id || user.is_moderator?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user