diff options
Diffstat (limited to 'app/models/note.rb')
-rw-r--r-- | app/models/note.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index cb285028203..a143c21c0f9 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -23,7 +23,7 @@ class Note < ApplicationRecord include FromUnion include Sortable - cache_markdown_field :note, pipeline: :note, issuable_state_filter_enabled: true + cache_markdown_field :note, pipeline: :note, issuable_reference_expansion_enabled: true redact_field :note @@ -603,6 +603,15 @@ class Note < ApplicationRecord }) end + def show_outdated_changes? + return false unless for_merge_request? + return false unless Feature.enabled?(:display_outdated_line_diff, noteable.source_project, default_enabled: :yaml) + return false unless system? + return false unless change_position&.line_range + + change_position.line_range["end"] || change_position.line_range["start"] + end + private def system_note_viewable_by?(user) |