diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-08 12:09:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-08 12:09:42 +0300 |
commit | f4ea1f8998fd64bcd02280514b91f103f830d5ce (patch) | |
tree | 14ff4a76b07da90dbaa9c75398b3bd2a79ac85c6 /app/assets/javascripts/diffs | |
parent | ae192a2f1410b5f71397a64df76238b9d3b0afbe (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/diffs')
-rw-r--r-- | app/assets/javascripts/diffs/components/app.vue | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue index c3436159cea..530f3a3a7f7 100644 --- a/app/assets/javascripts/diffs/components/app.vue +++ b/app/assets/javascripts/diffs/components/app.vue @@ -384,14 +384,26 @@ export default { this.unwatchDiscussions = this.$watch( () => `${this.diffFiles.length}:${this.$store.state.notes.discussions.length}`, - () => this.setDiscussions(), + () => { + this.setDiscussions(); + + if ( + this.$store.state.notes.doneFetchingBatchDiscussions && + window.gon?.features?.paginatedMrDiscussions + ) { + this.unwatchDiscussions(); + } + }, ); this.unwatchRetrievingBatches = this.$watch( () => `${this.retrievingBatches}:${this.$store.state.notes.discussions.length}`, () => { if (!this.retrievingBatches && this.$store.state.notes.discussions.length) { - this.unwatchDiscussions(); + if (!window.gon?.features?.paginatedMrDiscussions) { + this.unwatchDiscussions(); + } + this.unwatchRetrievingBatches(); } }, |