summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/diffs/components/diff_row.vue
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-01-27 06:08:58 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-01-27 06:08:58 +0000
commitc78a5f67d0bf347da8a486d72515478e20f15d6e (patch)
tree414a2f66561d04e56143587891b8fac8ea9ca026 /app/assets/javascripts/diffs/components/diff_row.vue
parent53e4185a6e266ac3ebb70663e9825c84b66f0b5e (diff)
downloadgitlab-ce-c78a5f67d0bf347da8a486d72515478e20f15d6e.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/diffs/components/diff_row.vue')
-rw-r--r--app/assets/javascripts/diffs/components/diff_row.vue12
1 files changed, 3 insertions, 9 deletions
diff --git a/app/assets/javascripts/diffs/components/diff_row.vue b/app/assets/javascripts/diffs/components/diff_row.vue
index db03da966c3..87655b249b8 100644
--- a/app/assets/javascripts/diffs/components/diff_row.vue
+++ b/app/assets/javascripts/diffs/components/diff_row.vue
@@ -111,13 +111,7 @@ export default {
return { conflict_our: this.line.right?.type === CONFLICT_THEIR };
},
shouldRenderCommentButton() {
- return (
- this.isLoggedIn &&
- !this.line.isContextLineLeft &&
- !this.line.isMetaLineLeft &&
- !this.line.hasDiscussionsLeft &&
- !this.line.hasDiscussionsRight
- );
+ return this.isLoggedIn && !this.line.isContextLineLeft && !this.line.isMetaLineLeft;
},
isLeftConflictMarker() {
return [CONFLICT_MARKER_OUR, CONFLICT_MARKER_THEIR].includes(this.line.left?.type);
@@ -199,7 +193,7 @@ export default {
>
<template v-if="!isLeftConflictMarker">
<span
- v-if="shouldRenderCommentButton"
+ v-if="shouldRenderCommentButton && !line.hasDiscussionsLeft"
v-gl-tooltip
data-testid="leftCommentButton"
class="add-diff-note tooltip-wrapper"
@@ -301,7 +295,7 @@ export default {
<div :class="classNameMapCellRight" class="diff-td diff-line-num new_line">
<template v-if="line.right.type !== $options.CONFLICT_MARKER_THEIR">
<span
- v-if="shouldRenderCommentButton"
+ v-if="shouldRenderCommentButton && !line.hasDiscussionsRight"
v-gl-tooltip
data-testid="rightCommentButton"
class="add-diff-note tooltip-wrapper"