Improves dropping of first note's comment

Improves calculating comments to be displayed by dropping first comment only if it is opening.
This commit is contained in:
Nenad Vujicic 2025-02-19 16:10:10 +01:00
parent 33dd13457c
commit bdf3abeb07

View file

@ -43,7 +43,7 @@ class NotesController < ApplicationController
@note_includes_anonymous = @note.author.nil? || @note_comments.find { |comment| comment.author.nil? }
@note_comments = @note_comments.drop(1) if @note.author.nil? || @note.author.active?
@note_comments = @note_comments.drop(1) if @note_comments.first&.event == "opened"
rescue ActiveRecord::RecordNotFound
render :template => "browse/not_found", :status => :not_found
end