Fix expansion of discussions in diff
This commit is contained in:
parent
6a355d451e
commit
10c5ec3e57
3 changed files with 3 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
- 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
|
||||
|
|
Loading…
Reference in a new issue