#468 - pin/unpin status
This commit is contained in:
parent
b491e6acbe
commit
1aa0e8d7e0
4 changed files with 34 additions and 6 deletions
|
@ -424,6 +424,10 @@ export const mutations = {
|
|||
newStatus.favoritedBy.push(user)
|
||||
}
|
||||
},
|
||||
setPinned (state, { status }) {
|
||||
const newStatus = state.allStatusesObject[status.id]
|
||||
newStatus.pinned = status.pinned
|
||||
},
|
||||
setRetweeted (state, { status, value }) {
|
||||
const newStatus = state.allStatusesObject[status.id]
|
||||
|
||||
|
@ -533,6 +537,9 @@ const statuses = {
|
|||
rootState.api.backendInteractor.unfavorite(status.id)
|
||||
.then(status => commit('setFavoritedConfirm', { status, user: rootState.users.currentUser }))
|
||||
},
|
||||
updatePinned ({ rootState, commit }, status) {
|
||||
commit('setPinned', { status })
|
||||
},
|
||||
retweet ({ rootState, commit }, status) {
|
||||
// Optimistic retweeting...
|
||||
commit('setRetweeted', { status, value: true })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue