Commit dcbf7d13 authored by Robert Speicher's avatar Robert Speicher
Browse files

Make better use of the `Note#for_*?` methods

We've got all these polymorphic type-checking methods, might as well use
'em everywhere it makes sense.
parent 6c6e23d51e34
......@@ -87,7 +87,7 @@ def discussions_from_notes(notes)
next if discussion_ids.include?(note.discussion_id)
# don't group notes for the main target
if !note.for_diff_line? && note.noteable_type == "MergeRequest"
if !note.for_diff_line? && note.for_merge_request?
discussions << [note]
else
discussions << notes.select do |other_note|
......@@ -383,7 +383,7 @@ def set_award!
private
def awards_supported?
(noteable.kind_of?(Issue) || noteable.is_a?(MergeRequest)) && !for_diff_line?
(for_issue? || for_merge_request?) && !for_diff_line?
end
def contains_emoji_only?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment