Commit aeec5fa3 authored by Phil Hughes's avatar Phil Hughes

Updated batch comments

Fixed resolved thread count not showing
parent 2b2220eb
......@@ -67,13 +67,23 @@ export const publishReview = ({ commit, dispatch, getters }) => {
.catch(() => commit(types.RECEIVE_PUBLISH_REVIEW_ERROR));
};
export const updateDiscussionsAfterPublish = ({ dispatch, getters, rootGetters }) =>
dispatch('fetchDiscussions', { path: getters.getNotesData.discussionsPath }, { root: true }).then(
() =>
dispatch('diffs/assignDiscussionsToDiff', rootGetters.discussionsStructuredByLineCode, {
root: true,
}),
);
export const updateDiscussionsAfterPublish = async ({ dispatch, getters, rootGetters }) => {
if (window.gon?.features?.paginatedNotes) {
await dispatch('stopPolling', null, { root: true });
await dispatch('fetchData', null, { root: true });
await dispatch('restartPolling', null, { root: true });
} else {
await dispatch(
'fetchDiscussions',
{ path: getters.getNotesData.discussionsPath },
{ root: true },
);
}
dispatch('diffs/assignDiscussionsToDiff', rootGetters.discussionsStructuredByLineCode, {
root: true,
});
};
export const updateDraft = (
{ commit, getters },
......
......@@ -108,6 +108,7 @@ export default {
async isFetching() {
if (!this.isFetching) {
await this.$nextTick();
await this.updateResolvableDiscussionsCounts();
await this.startTaskList();
await this.checkLocationHash();
}
......@@ -179,6 +180,7 @@ export default {
'convertToDiscussion',
'stopPolling',
'setConfidentiality',
'updateResolvableDiscussionsCounts',
]),
discussionIsIndividualNoteAndNotConverted(discussion) {
return discussion.individual_note && !this.convertedDisscussionIds.includes(discussion.id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment