diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
commit | 43a25d93ebdabea52f99b05e15b06250cd8f07d7 (patch) | |
tree | dceebdc68925362117480a5d672bcff122fb625b /app/assets/javascripts/diffs/store/mutations.js | |
parent | 20c84b99005abd1c82101dfeff264ac50d2df211 (diff) |
Add latest changes from gitlab-org/gitlab@16-0-stable-eev16.0.0-rc42
Diffstat (limited to 'app/assets/javascripts/diffs/store/mutations.js')
-rw-r--r-- | app/assets/javascripts/diffs/store/mutations.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/app/assets/javascripts/diffs/store/mutations.js b/app/assets/javascripts/diffs/store/mutations.js index d2b798245fc..5e7fe8b5cd8 100644 --- a/app/assets/javascripts/diffs/store/mutations.js +++ b/app/assets/javascripts/diffs/store/mutations.js @@ -15,6 +15,7 @@ import { prepareDiffData, isDiscussionApplicableToLine, updateLineInFile, + markTreeEntriesLoaded, } from './utils'; function updateDiffFilesInState(state, files) { @@ -33,6 +34,7 @@ export default { endpoint, endpointMetadata, endpointBatch, + endpointDiffForPath, endpointCoverage, endpointUpdateUser, projectPath, @@ -46,6 +48,7 @@ export default { endpoint, endpointMetadata, endpointBatch, + endpointDiffForPath, endpointCoverage, endpointUpdateUser, projectPath, @@ -80,9 +83,15 @@ export default { }, [types.SET_DIFF_DATA_BATCH](state, data) { - state.diffFiles = prepareDiffData({ - diff: data, - priorFiles: state.diffFiles, + Object.assign(state, { + diffFiles: prepareDiffData({ + diff: data, + priorFiles: state.diffFiles, + }), + treeEntries: markTreeEntriesLoaded({ + priorEntries: state.treeEntries, + loadedFiles: data.diff_files, + }), }); }, |