Avoid iterating over statuses to set thread_muted if the backend does

not support the extension
This commit is contained in:
rinpatch 2019-09-04 22:17:29 +03:00
parent 1a5a7bbebf
commit b33667a743

View File

@ -430,7 +430,9 @@ export const mutations = {
const newStatus = state.allStatusesObject[status.id]
newStatus.thread_muted = status.thread_muted
state.conversationsObject[newStatus.statusnet_conversation_id].forEach(status => { status.thread_muted = newStatus.thread_muted })
if (newStatus.thread_muted !== undefined) {
state.conversationsObject[newStatus.statusnet_conversation_id].forEach(status => { status.thread_muted = newStatus.thread_muted })
}
},
setRetweeted (state, { status, value }) {
const newStatus = state.allStatusesObject[status.id]