diff options
Diffstat (limited to 'app/assets/javascripts/ide/stores')
-rw-r--r-- | app/assets/javascripts/ide/stores/actions/file.js | 7 | ||||
-rw-r--r-- | app/assets/javascripts/ide/stores/actions/merge_request.js | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/assets/javascripts/ide/stores/actions/file.js b/app/assets/javascripts/ide/stores/actions/file.js index 30dcf7ef4df..2cdbb312b9e 100644 --- a/app/assets/javascripts/ide/stores/actions/file.js +++ b/app/assets/javascripts/ide/stores/actions/file.js @@ -56,7 +56,10 @@ export const setFileActive = ({ commit, state, getters, dispatch }, path) => { dispatch('scrollToTab'); }; -export const getFileData = ({ state, commit, dispatch }, { path, makeFileActive = true }) => { +export const getFileData = ( + { state, commit, dispatch }, + { path, makeFileActive = true, openFile = makeFileActive }, +) => { const file = state.entries[path]; if (file.raw || (file.tempFile && !file.prevPath)) return Promise.resolve(); @@ -72,7 +75,7 @@ export const getFileData = ({ state, commit, dispatch }, { path, makeFileActive setPageTitle(decodeURI(normalizedHeaders['PAGE-TITLE'])); commit(types.SET_FILE_DATA, { data, file }); - if (makeFileActive) commit(types.TOGGLE_FILE_OPEN, path); + if (openFile) commit(types.TOGGLE_FILE_OPEN, path); if (makeFileActive) dispatch('setFileActive', path); commit(types.TOGGLE_LOADING, { entry: file }); }) diff --git a/app/assets/javascripts/ide/stores/actions/merge_request.js b/app/assets/javascripts/ide/stores/actions/merge_request.js index 3ac2f8b3698..8404c6d4f72 100644 --- a/app/assets/javascripts/ide/stores/actions/merge_request.js +++ b/app/assets/javascripts/ide/stores/actions/merge_request.js @@ -161,6 +161,7 @@ export const openMergeRequest = ( dispatch('getFileData', { path: change.new_path, makeFileActive: ind === 0, + openFile: true, }); } } |