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 }) => { ...@@ -67,13 +67,23 @@ export const publishReview = ({ commit, dispatch, getters }) => {
.catch(() => commit(types.RECEIVE_PUBLISH_REVIEW_ERROR)); .catch(() => commit(types.RECEIVE_PUBLISH_REVIEW_ERROR));
}; };
export const updateDiscussionsAfterPublish = ({ dispatch, getters, rootGetters }) => export const updateDiscussionsAfterPublish = async ({ dispatch, getters, rootGetters }) => {
dispatch('fetchDiscussions', { path: getters.getNotesData.discussionsPath }, { root: true }).then( if (window.gon?.features?.paginatedNotes) {
() => await dispatch('stopPolling', null, { root: true });
dispatch('diffs/assignDiscussionsToDiff', rootGetters.discussionsStructuredByLineCode, { await dispatch('fetchData', null, { root: true });
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 = ( export const updateDraft = (
{ commit, getters }, { commit, getters },
......
...@@ -108,6 +108,7 @@ export default { ...@@ -108,6 +108,7 @@ export default {
async isFetching() { async isFetching() {
if (!this.isFetching) { if (!this.isFetching) {
await this.$nextTick(); await this.$nextTick();
await this.updateResolvableDiscussionsCounts();
await this.startTaskList(); await this.startTaskList();
await this.checkLocationHash(); await this.checkLocationHash();
} }
...@@ -179,6 +180,7 @@ export default { ...@@ -179,6 +180,7 @@ export default {
'convertToDiscussion', 'convertToDiscussion',
'stopPolling', 'stopPolling',
'setConfidentiality', 'setConfidentiality',
'updateResolvableDiscussionsCounts',
]), ]),
discussionIsIndividualNoteAndNotConverted(discussion) { discussionIsIndividualNoteAndNotConverted(discussion) {
return discussion.individual_note && !this.convertedDisscussionIds.includes(discussion.id); 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