@AntonKhorev commented on this pull request.


> @@ -52,10 +52,10 @@
     <% end %>
   </div>
 
-  <% if @note_comments.length > 1 %>
+  <% if @note_comments.length > (!@note.author.nil? && @note.author.status == 
"deleted" ? 0 : 1) %>

I think it's better to make `@note_comments` contain true comments in the 
controller instead of having this condition checked twice here.

`@note_comments` were used in three places of this view: description, anonymous 
warning and discussion.
- Description is handled differently now.
- Discussion is going to work with all `@note_comments` without deciding which 
to drop.
- Anonymous warning will need to check if either note author is nil or any 
comment's author is nil. Maybe this check is also better done in the controller 
and saved to some variable.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5609#pullrequestreview-2595757498
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/5609/review/2595757...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to