diff --git a/app/controllers/stories_controller.rb b/app/controllers/stories_controller.rb index 0b9a39a..060304a 100644 --- a/app/controllers/stories_controller.rb +++ b/app/controllers/stories_controller.rb @@ -137,10 +137,13 @@ class StoriesController < ApplicationController @comments = @story.merged_comments.includes(:user, :story, :hat).arrange_for_user(@user) + @force_show_thread_id = nil + if params[:comment_short_id] @comments.each do |c,x| if c.short_id == params[:comment_short_id] c.highlighted = true + @force_show_thread_id = c.thread_id break end end diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index ee3aee1..38b9055 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -1,6 +1,8 @@ > + <%= comment.score <= Comment::DOWNVOTABLE_MIN_SCORE && + !(@force_show_thread_id && @force_show_thread_id == comment.thread_id) ? + "checked" : "" %>>