mirror of https://github.com/Kylart/KawAnime.git
Fix bug where cancelling path choice dialog would end up not being able to open any more dialog + random dialog appearance
This commit is contained in:
parent
769d89838e
commit
ba518703f3
|
@ -57,6 +57,8 @@ exports.openExternal = (query, res) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
sendRes(res, result)
|
sendRes(res, result)
|
||||||
|
} else {
|
||||||
|
sendEmptyRes(res)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
|
|
|
@ -327,17 +327,21 @@ export default {
|
||||||
async changePath ({commit, dispatch}) {
|
async changePath ({commit, dispatch}) {
|
||||||
const {data} = await axios.get('openThis?type=dialog')
|
const {data} = await axios.get('openThis?type=dialog')
|
||||||
|
|
||||||
commit('emptyLocals')
|
if (data) {
|
||||||
commit('setCurrentDir', data.path)
|
commit('emptyLocals')
|
||||||
dispatch('refreshLocal')
|
commit('setCurrentDir', data.path)
|
||||||
|
dispatch('refreshLocal')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async changePathWithConfig ({commit, dispatch}) {
|
async changePathWithConfig ({commit, dispatch}) {
|
||||||
const {data} = await axios.get('openThis?type=dialog')
|
const {data} = await axios.get('openThis?type=dialog')
|
||||||
|
|
||||||
commit('emptyLocals')
|
if (data) {
|
||||||
commit('setCurrentDir', data.path)
|
commit('emptyLocals')
|
||||||
commit('setConfigDir', data.path)
|
commit('setCurrentDir', data.path)
|
||||||
dispatch('refreshLocal')
|
commit('setConfigDir', data.path)
|
||||||
|
dispatch('refreshLocal')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async openNewsLink ({state}, link) {
|
async openNewsLink ({state}, link) {
|
||||||
log(`Opening ${link}`)
|
log(`Opening ${link}`)
|
||||||
|
|
Loading…
Reference in New Issue