refs #1035 Add reload method for toot detail in sidebar

This commit is contained in:
AkiraFukushima 2019-09-15 23:18:57 +09:00
parent ad7e93c72a
commit 0a3701a0ba
2 changed files with 4 additions and 0 deletions

View File

@ -120,6 +120,7 @@ export default {
.slide-detail-leave-active {
transition: all 0.5s;
}
.slide-detail-enter,
.slide-detail-leave-to {
margin-right: -360px;

View File

@ -126,6 +126,9 @@ const actions: ActionTree<TootDetailState, RootState> = {
commit(MUTATION_TYPES.UPDATE_ANCESTORS, res.data.ancestors)
commit(MUTATION_TYPES.UPDATE_DESCENDANTS, res.data.descendants)
return res.data
},
reload: async ({ state, dispatch }) => {
await dispatch('fetchToot', state.message)
}
}