diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-26 15:08:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-26 15:08:44 +0300 |
commit | 6e320396b26439a0c3fa1df1ce9f4c2395518227 (patch) | |
tree | 46e646052ba87e38f6e6866692d92cdb01878189 /app/assets/javascripts/notes | |
parent | c60d68bbaca234673f2f689e1f7444ce8edbcf86 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/notes')
-rw-r--r-- | app/assets/javascripts/notes/components/diff_with_note.vue | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/notes/components/diff_with_note.vue b/app/assets/javascripts/notes/components/diff_with_note.vue index a4271852563..91cf682943e 100644 --- a/app/assets/javascripts/notes/components/diff_with_note.vue +++ b/app/assets/javascripts/notes/components/diff_with_note.vue @@ -7,6 +7,7 @@ import DiffViewer from '~/vue_shared/components/diff_viewer/diff_viewer.vue'; import ImageDiffOverlay from '~/diffs/components/image_diff_overlay.vue'; import { getDiffMode } from '~/diffs/store/utils'; import { diffViewerModes } from '~/ide/constants'; +import { isCollapsed } from '../../diffs/diff_file'; const FIRST_CHAR_REGEX = /^(\+|-| )/; @@ -46,6 +47,9 @@ export default { this.discussion.truncated_diff_lines && this.discussion.truncated_diff_lines.length !== 0 ); }, + isCollapsed() { + return isCollapsed(this.discussion.diff_file); + }, }, mounted() { if (this.isTextFile && !this.hasTruncatedDiffLines) { @@ -76,7 +80,7 @@ export default { :discussion-path="discussion.discussion_path" :diff-file="discussion.diff_file" :can-current-user-fork="false" - :expanded="!discussion.diff_file.viewer.automaticallyCollapsed" + :expanded="!isCollapsed" /> <div v-if="isTextFile" class="diff-content"> <table class="code js-syntax-highlight" :class="$options.userColorSchemeClass"> |