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) => {
|
||||
if (state.changing) {
|
||||
return null
|
||||
|
@ -58,6 +58,10 @@ const GlobalHeader = {
|
|||
if (rootState.route.params.id === account._id) {
|
||||
return null
|
||||
}
|
||||
// When the modal window is active, don't change account
|
||||
if (rootGetters['TimelineSpace/Modals/modalOpened']) {
|
||||
return null
|
||||
}
|
||||
// changing finish after loading
|
||||
commit('updateChanging', true)
|
||||
router.push(`/${account._id}/home`)
|
||||
|
|
Loading…
Reference in New Issue