logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 11436358b4091c58532603adcd0f8b9d2e9e7775
parent: 0e0a9e716ca5adfe9ed8599df1c76dd8f1bfddcc
Author: Eugen Rochko <eugen@zeonfederated.com>
Date:   Sat,  7 Oct 2017 12:16:39 +0200

Fix regression from #5206 - deduplicate descendants (#5253)


Diffstat:

Mapp/javascript/mastodon/reducers/contexts.js8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/app/javascript/mastodon/reducers/contexts.js b/app/javascript/mastodon/reducers/contexts.js @@ -34,7 +34,13 @@ const deleteFromContexts = (state, id) => { const updateContext = (state, status, references) => { return state.update('descendants', map => { references.forEach(parentId => { - map = map.update(parentId, ImmutableList(), list => list.push(status.id)); + map = map.update(parentId, ImmutableList(), list => { + if (list.includes(status.id)) { + return list; + } + + return list.push(status.id); + }); }); return map;