Skip to content

Commit

Permalink
Removes dropping note's first comment
Browse files Browse the repository at this point in the history
Removes dropping note's first visible comment in case of deleted note's author. After adding displaying "deleted" as note's description, first visible comment is now displayed as note's comments.
  • Loading branch information
nenad-vujicic committed Jan 28, 2025
1 parent b59e204 commit d791420
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/notes/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
<% end %>
</div>

<% if @note_comments.length > 1 %>
<% if @note_comments.length > (@note.author_deleted? ? 0 : 1) %>
<div class='note-comments'>
<ul class="list-unstyled">
<% @note_comments.drop(1).each do |comment| %>
<% @note_comments.drop(@note.author_deleted? ? 0 : 1).each do |comment| %>
<li id="c<%= comment.id %>">
<small class='text-body-secondary'><%= note_event(comment.event, comment.created_at, comment.author) %></small>
<div class="mx-2">
Expand Down

0 comments on commit d791420

Please sign in to comment.