Commit 10c5ec3e authored by Douwe Maan's avatar Douwe Maan

Fix expansion of discussions in diff

parent 6a355d45
- expanded = local_assigns.fetch(:expanded, discussion.expanded?)
- expanded = local_assigns.fetch(:expanded, true)
%tr.notes_holder{class: ('hide' unless expanded)}
%td.notes_line{ colspan: 2 }
%td.notes_content
......
......@@ -30,8 +30,8 @@
= diff_line_content(line.text, type)
- discussions = local_assigns.fetch(:discussions, nil)
- discussion_expanded = local_assigns.fetch(:discussion_expanded, false)
- if discussions && !line.meta?
- discussion = discussions[line_code]
- if discussion
- discussion_expanded = local_assigns.fetch(:discussion_expanded, discussion.expanded?)
= render "discussions/diff_discussion", discussion: discussion, expanded: discussion_expanded
......@@ -9,9 +9,7 @@
= render partial: "projects/diffs/line",
collection: diff_file.highlighted_diff_lines,
as: :line,
locals: { diff_file: diff_file,
discussions: discussions,
plain: true }
locals: { diff_file: diff_file, discussions: discussions }
- last_line = diff_file.highlighted_diff_lines.last.new_pos
- if !diff_file.new_file && last_line > 0
......
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