Set thread_muted for all statuses with the same conversation id on
status mute/unmute
This commit is contained in:
parent
66a34b7ecf
commit
1a5a7bbebf
|
@ -10,14 +10,14 @@
|
||||||
<div slot="popover">
|
<div slot="popover">
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<button
|
<button
|
||||||
v-if="canMute && !status.muted"
|
v-if="canMute && !status.thread_muted"
|
||||||
class="dropdown-item dropdown-item-icon"
|
class="dropdown-item dropdown-item-icon"
|
||||||
@click.prevent="muteConversation"
|
@click.prevent="muteConversation"
|
||||||
>
|
>
|
||||||
<i class="icon-eye-off" /><span>{{ $t("status.mute_conversation") }}</span>
|
<i class="icon-eye-off" /><span>{{ $t("status.mute_conversation") }}</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
v-if="canMute && status.muted"
|
v-if="canMute && status.thread_muted"
|
||||||
class="dropdown-item dropdown-item-icon"
|
class="dropdown-item dropdown-item-icon"
|
||||||
@click.prevent="unmuteConversation"
|
@click.prevent="unmuteConversation"
|
||||||
>
|
>
|
||||||
|
|
|
@ -117,7 +117,7 @@ const Status = {
|
||||||
|
|
||||||
return hits
|
return hits
|
||||||
},
|
},
|
||||||
muted () { return !this.unmuted && (this.status.muted || this.muteWordHits.length > 0) },
|
muted () { return !this.unmuted && (this.status.user.muted || this.status.thread_muted || this.muteWordHits.length > 0) },
|
||||||
hideFilteredStatuses () {
|
hideFilteredStatuses () {
|
||||||
return typeof this.$store.state.config.hideFilteredStatuses === 'undefined'
|
return typeof this.$store.state.config.hideFilteredStatuses === 'undefined'
|
||||||
? this.$store.state.instance.hideFilteredStatuses
|
? this.$store.state.instance.hideFilteredStatuses
|
||||||
|
|
|
@ -426,9 +426,11 @@ export const mutations = {
|
||||||
newStatus.favoritedBy.push(user)
|
newStatus.favoritedBy.push(user)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setMuted (state, status) {
|
setMutedStatus (state, status) {
|
||||||
const newStatus = state.allStatusesObject[status.id]
|
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 }) {
|
setRetweeted (state, { status, value }) {
|
||||||
const newStatus = state.allStatusesObject[status.id]
|
const newStatus = state.allStatusesObject[status.id]
|
||||||
|
@ -566,11 +568,11 @@ const statuses = {
|
||||||
},
|
},
|
||||||
muteConversation ({ rootState, commit }, statusId) {
|
muteConversation ({ rootState, commit }, statusId) {
|
||||||
return rootState.api.backendInteractor.muteConversation(statusId)
|
return rootState.api.backendInteractor.muteConversation(statusId)
|
||||||
.then((status) => commit('setMuted', status))
|
.then((status) => commit('setMutedStatus', status))
|
||||||
},
|
},
|
||||||
unmuteConversation ({ rootState, commit }, statusId) {
|
unmuteConversation ({ rootState, commit }, statusId) {
|
||||||
return rootState.api.backendInteractor.unmuteConversation(statusId)
|
return rootState.api.backendInteractor.unmuteConversation(statusId)
|
||||||
.then((status) => commit('setMuted', status))
|
.then((status) => commit('setMutedStatus', status))
|
||||||
},
|
},
|
||||||
retweet ({ rootState, commit }, status) {
|
retweet ({ rootState, commit }, status) {
|
||||||
// Optimistic retweeting...
|
// Optimistic retweeting...
|
||||||
|
|
|
@ -224,6 +224,7 @@ export const parseStatus = (data) => {
|
||||||
output.statusnet_conversation_id = data.pleroma.conversation_id
|
output.statusnet_conversation_id = data.pleroma.conversation_id
|
||||||
output.is_local = pleroma.local
|
output.is_local = pleroma.local
|
||||||
output.in_reply_to_screen_name = data.pleroma.in_reply_to_account_acct
|
output.in_reply_to_screen_name = data.pleroma.in_reply_to_account_acct
|
||||||
|
output.thread_muted = pleroma.thread_muted
|
||||||
} else {
|
} else {
|
||||||
output.text = data.content
|
output.text = data.content
|
||||||
output.summary = data.spoiler_text
|
output.summary = data.spoiler_text
|
||||||
|
|
Loading…
Reference in New Issue