File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5959 <%= render 'comments/skip_deleted' , inline : inline , num_skipped : skipped_deleted , thread : thread %>
6060 <% skipped_deleted = 0 %>
6161 <% end %>
62- <% if shown_comments_count > max_shown_comments && comment . id . to_i == comment_id . to_i %>
63- <%= render 'comments/skip_more' , shown_count : shown_comments_count , thread : thread %>
62+ <% skipped_more = thread . reply_count - shown_comments_count %>
63+ <% if shown_comments_count > max_shown_comments && skipped_more . positive? && comment . id . to_i == comment_id . to_i %>
64+ <%= render 'comments/skip_more' , num_skipped : skipped_more , thread : thread %>
6465 <% end %>
6566 < div class ="widget--body " role ="listitem ">
6667 <%= render 'comments/comment' , comment : comment , pingable : pingable %>
Original file line number Diff line number Diff line change 22 Renders widgets indicating that there more comments are not shown
33
44 Variables:
5- shown_count : number of comments shown on the thread
5+ num_skipped : number of comments skipped on the thread
66 thread : CommentThread to display the widget for
77%>
88
99< div class ="widget--body widget--more-comments " role ="listitem ">
10- <% skipped_count = thread . reply_count - shown_count %>
11- < p > Skipping <%= pluralize ( skipped_count , 'more comment' ) %> </ p >
10+ < p > Skipping <%= pluralize ( num_skipped , 'more comment' ) %> </ p >
1211</ div >
You can’t perform that action at this time.
0 commit comments