logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: f3003417c5e109f41912b3595536c6adae81c97b
parent: 33ea042decc03c494c78a896934455ef79abc16b
Author: Eugen Rochko <eugen@zeonfederated.com>
Date:   Tue, 17 Oct 2017 22:17:02 +0200

When unreblog arrives over streaming API, just delete in UI (#5439)


Diffstat:

Mapp/javascript/mastodon/reducers/timelines.js10++--------
1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/app/javascript/mastodon/reducers/timelines.js b/app/javascript/mastodon/reducers/timelines.js @@ -75,15 +75,9 @@ const updateTimeline = (state, timeline, status, references) => { })); }; -const deleteStatus = (state, id, accountId, references, reblogOf) => { +const deleteStatus = (state, id, accountId, references) => { state.keySeq().forEach(timeline => { - state = state.updateIn([timeline, 'items'], list => { - if (reblogOf && !list.includes(reblogOf)) { - return list.map(item => item === id ? reblogOf : item); - } else { - return list.filterNot(item => item === id); - } - }); + state = state.updateIn([timeline, 'items'], list => list.filterNot(item => item === id)); }); // Remove reblogs of deleted status