improve code quality

This commit is contained in:
Brenden Bice 2019-04-02 16:00:09 -04:00
parent 8c9bcdc6c1
commit 8a2f55644c
2 changed files with 9 additions and 36 deletions

View file

@ -121,8 +121,8 @@ const conversation = {
this.$store.state.api.backendInteractor.fetchConversation({id: this.status.id})
.then(({ancestors, descendants}) => {
const ancestorId = ancestors.length ? ancestors[0].id : this.status.id
this.fetchFavoritedByUsers(ancestorId)
this.fetchRebloggedByUsers(ancestorId)
this.$store.dispatch('fetchFavoritedByUsers', { id: ancestorId })
this.$store.dispatch('fetchRebloggedByUsers', { id: ancestorId })
this.$store.dispatch('addNewStatuses', { statuses: ancestors })
this.$store.dispatch('addNewStatuses', { statuses: descendants })
})
@ -151,12 +151,6 @@ const conversation = {
if (!this.expanded) {
this.setHighlight(null)
}
},
fetchFavoritedByUsers (id) {
this.$store.dispatch('fetchFavoritedByUsers', { id })
},
fetchRebloggedByUsers (id) {
this.$store.dispatch('fetchRebloggedByUsers', { id })
}
}
}