forked from AkkomaGang/akkoma-fe
add unretweet action to statuses.js
This commit is contained in:
parent
d05fcfa1a8
commit
556eb4b8a3
2 changed files with 5 additions and 0 deletions
|
@ -22,6 +22,7 @@ const RetweetButton = {
|
||||||
classes () {
|
classes () {
|
||||||
return {
|
return {
|
||||||
'retweeted': this.status.repeated,
|
'retweeted': this.status.repeated,
|
||||||
|
'retweeted-empty': !this.status.repeated,
|
||||||
'animate-spin': this.animated
|
'animate-spin': this.animated
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -388,6 +388,10 @@ const statuses = {
|
||||||
commit('setRetweeted', { status, value: true })
|
commit('setRetweeted', { status, value: true })
|
||||||
apiService.retweet({ id: status.id, credentials: rootState.users.currentUser.credentials })
|
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 }) {
|
queueFlush ({ rootState, commit }, { timeline, id }) {
|
||||||
commit('queueFlush', { timeline, id })
|
commit('queueFlush', { timeline, id })
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue