Welcome to mirror list, hosted at ThFree Co, Russian Federation.

base_service.rb « notes « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c1260837c12ae4b5c79e59d3d513f5e23be9bebc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

module Notes
  class BaseService < ::BaseService
    def clear_noteable_diffs_cache(note)
      if note.is_a?(DiffNote) &&
          note.discussion_first_note? &&
          note.position.unfolded_diff?(project.repository)
        note.noteable.diffs.clear_cache
      end
    end
  end
end