add unretweet action to statuses.js
This commit is contained in:
parent
d05fcfa1a8
commit
556eb4b8a3
|
@ -22,6 +22,7 @@ const RetweetButton = {
|
|||
classes () {
|
||||
return {
|
||||
'retweeted': this.status.repeated,
|
||||
'retweeted-empty': !this.status.repeated,
|
||||
'animate-spin': this.animated
|
||||
}
|
||||
}
|
||||
|
|
|
@ -388,6 +388,10 @@ const statuses = {
|
|||
commit('setRetweeted', { status, value: true })
|
||||
apiService.retweet({ id: status.id, credentials: rootState.users.currentUser.credentials })
|
||||
},
|
||||
unretweet ({ rootState, commit }, status) {
|
||||
commit('setRetweeted', { status, value: false })
|
||||
apiService.unretweet({ id: status.id, credentials: rootState.users.currentUser.credentials })
|
||||
},
|
||||
queueFlush ({ rootState, commit }, { timeline, id }) {
|
||||
commit('queueFlush', { timeline, id })
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue