Merge pull request #726 from amyspark/clear-timeline-sidebar

Always clear timeline between switches/refreshes
This commit is contained in:
AkiraFukushima 2018-11-18 11:51:23 +09:00 committed by GitHub
commit e86d1c909a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -36,6 +36,7 @@ export default {
},
watch: {
account: function (newAccount, oldAccount) {
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/Timeline/clearTimeline')
this.load()
}
},

View File

@ -80,6 +80,9 @@ const Timeline = {
commit('changeLazyLoading', false)
throw err
})
},
clearTimeline ({ state, commit, rootState }) {
commit('updateTimeline', [])
}
}
}

View File

@ -89,6 +89,8 @@ const TootDetail = {
},
actions: {
changeToot ({ commit, dispatch }, message) {
commit('updateAncestors', [])
commit('updateDescendants', [])
commit('changeToot', message)
},
fetchToot ({ state, commit, rootState }, message) {