Merge pull request #408 from h3poteto/iss-406

closes #406 Reload side menu after create a list
This commit is contained in:
AkiraFukushima 2018-06-20 00:26:11 +09:00 committed by GitHub
commit 34c6316bb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -76,6 +76,7 @@ export default {
} finally {
this.creating = false
}
await this.$store.dispatch('TimelineSpace/SideMenu/fetchLists')
},
edit (list) {
return this.$router.push(`/${this.id()}/lists/${list.id}/edit`)

View File

@ -27,7 +27,8 @@ const SideMenu = {
}
},
actions: {
fetchLists ({ commit }, account) {
fetchLists ({ commit, rootState }, account = null) {
if (account === null) account = rootState.TimelineSpace.account
const client = new Mastodon(
account.accessToken,
account.baseURL + '/api/v1'