Skip to content
Snippets Groups Projects
Unverified Commit 1519c347 authored by Phil Hughes's avatar Phil Hughes
Browse files

Stop multiple discussion requests

With multiple discussion requests we loose the reactivity of the
previously stored discussions state.
This means that certain features, toggling line discussions for example,
are no longer reactive.
parent 369631c8
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -50,6 +50,7 @@ export default {
},
data() {
return {
isFetching: false,
currentFilter: null,
};
},
Loading
Loading
@@ -141,6 +142,10 @@ export default {
return discussion.individual_note ? { note: discussion.notes[0] } : { discussion };
},
fetchNotes() {
if (this.isFetching) return null;
this.isFetching = true;
return this.fetchDiscussions({ path: this.getNotesDataByProp('discussionsPath') })
.then(() => {
this.initPolling();
Loading
Loading
@@ -149,6 +154,7 @@ export default {
this.setLoadingState(false);
this.setNotesFetchedState(true);
eventHub.$emit('fetchedNotesData');
this.isFetching = false;
})
.then(() => this.$nextTick())
.then(() => this.checkLocationHash())
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment