Merge pull request #692 from h3poteto/iss-691
closes #691 Block changing account when the modal is active
This commit is contained in:
commit
ea8b6f87b6
|
@ -50,7 +50,7 @@ const GlobalHeader = {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
watchShortcutEvents ({ state, commit, rootState }) {
|
watchShortcutEvents ({ state, commit, rootState, rootGetters }) {
|
||||||
ipcRenderer.on('change-account', (event, account) => {
|
ipcRenderer.on('change-account', (event, account) => {
|
||||||
if (state.changing) {
|
if (state.changing) {
|
||||||
return null
|
return null
|
||||||
|
@ -58,6 +58,10 @@ const GlobalHeader = {
|
||||||
if (rootState.route.params.id === account._id) {
|
if (rootState.route.params.id === account._id) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
// When the modal window is active, don't change account
|
||||||
|
if (rootGetters['TimelineSpace/Modals/modalOpened']) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
// changing finish after loading
|
// changing finish after loading
|
||||||
commit('updateChanging', true)
|
commit('updateChanging', true)
|
||||||
router.push(`/${account._id}/home`)
|
router.push(`/${account._id}/home`)
|
||||||
|
|
Loading…
Reference in New Issue