Set thread_muted for all statuses with the same conversation id on
status mute/unmute
This commit is contained in:
parent
66a34b7ecf
commit
1a5a7bbebf
4 changed files with 10 additions and 7 deletions
|
@ -426,9 +426,11 @@ export const mutations = {
|
|||
newStatus.favoritedBy.push(user)
|
||||
}
|
||||
},
|
||||
setMuted (state, status) {
|
||||
setMutedStatus (state, status) {
|
||||
const newStatus = state.allStatusesObject[status.id]
|
||||
newStatus.muted = status.muted
|
||||
newStatus.thread_muted = status.thread_muted
|
||||
|
||||
state.conversationsObject[newStatus.statusnet_conversation_id].forEach(status => { status.thread_muted = newStatus.thread_muted })
|
||||
},
|
||||
setRetweeted (state, { status, value }) {
|
||||
const newStatus = state.allStatusesObject[status.id]
|
||||
|
@ -566,11 +568,11 @@ const statuses = {
|
|||
},
|
||||
muteConversation ({ rootState, commit }, statusId) {
|
||||
return rootState.api.backendInteractor.muteConversation(statusId)
|
||||
.then((status) => commit('setMuted', status))
|
||||
.then((status) => commit('setMutedStatus', status))
|
||||
},
|
||||
unmuteConversation ({ rootState, commit }, statusId) {
|
||||
return rootState.api.backendInteractor.unmuteConversation(statusId)
|
||||
.then((status) => commit('setMuted', status))
|
||||
.then((status) => commit('setMutedStatus', status))
|
||||
},
|
||||
retweet ({ rootState, commit }, status) {
|
||||
// Optimistic retweeting...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue