Simplify nsfw setting.
This commit is contained in:
parent
cc7f7a29cf
commit
79b2243f6c
1 changed files with 2 additions and 8 deletions
|
@ -153,14 +153,8 @@ export const mutations = {
|
||||||
state.timelines[timeline].loading = value
|
state.timelines[timeline].loading = value
|
||||||
},
|
},
|
||||||
setNsfw (state, { id, nsfw }) {
|
setNsfw (state, { id, nsfw }) {
|
||||||
// For now, walk through all the statuses because the stuff might be in the replied_to_status
|
const newStatus = find(state.allStatuses, { id })
|
||||||
// TODO: Save the replied_tos as references.
|
newStatus.nsfw = nsfw
|
||||||
each(state.allStatuses, (statusoid) => {
|
|
||||||
const status = statusoid.retweeted_status || statusoid
|
|
||||||
if (status.id === id) {
|
|
||||||
status.nsfw = nsfw
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue