diff options
| author | Roger Braun <roger@rogerbraun.net> | 2016-11-07 18:47:38 +0100 |
|---|---|---|
| committer | Roger Braun <roger@rogerbraun.net> | 2016-11-07 18:47:38 +0100 |
| commit | 79b2243f6ceec9e6f11e48a3d5c3c63f68636d70 (patch) | |
| tree | 135d75ddebf236ef4d1fcbf63aaff3b96139d4cd /src | |
| parent | cc7f7a29cf8435cc2486122976504c38ffe75c33 (diff) | |
Simplify nsfw setting.
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules/statuses.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 2f5238ee..7913c289 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -153,14 +153,8 @@ export const mutations = { state.timelines[timeline].loading = value }, setNsfw (state, { id, nsfw }) { - // For now, walk through all the statuses because the stuff might be in the replied_to_status - // TODO: Save the replied_tos as references. - each(state.allStatuses, (statusoid) => { - const status = statusoid.retweeted_status || statusoid - if (status.id === id) { - status.nsfw = nsfw - } - }) + const newStatus = find(state.allStatuses, { id }) + newStatus.nsfw = nsfw } } |
