summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/diffs/components/app.vue13
1 files changed, 10 insertions, 3 deletions
diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue
index 23b8458aa6b..463d1427805 100644
--- a/app/assets/javascripts/diffs/components/app.vue
+++ b/app/assets/javascripts/diffs/components/app.vue
@@ -163,9 +163,6 @@ export default {
},
isLoading: 'adjustView',
showTreeList: 'adjustView',
- retrievingBatches(newVal) {
- if (!newVal) this.unwatchDiscussions();
- },
},
mounted() {
this.setBaseConfig({
@@ -198,6 +195,16 @@ export default {
() => `${this.diffFiles.length}:${this.$store.state.notes.discussions.length}`,
() => this.setDiscussions(),
);
+
+ this.unwatchRetrievingBatches = this.$watch(
+ () => `${this.retrievingBatches}:${this.$store.state.notes.discussions.length}`,
+ () => {
+ if (!this.retrievingBatches && this.$store.state.notes.discussions.length) {
+ this.unwatchDiscussions();
+ this.unwatchRetrievingBatches();
+ }
+ },
+ );
},
beforeDestroy() {
eventHub.$off('fetchDiffData', this.fetchData);