From: Eugen Rochko Date: Tue, 17 Oct 2017 20:17:02 +0000 (+0200) Subject: When unreblog arrives over streaming API, just delete in UI (#5439) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=f3003417c5e109f41912b3595536c6adae81c97b;p=mastodon.git When unreblog arrives over streaming API, just delete in UI (#5439) --- diff --git a/app/javascript/mastodon/reducers/timelines.js b/app/javascript/mastodon/reducers/timelines.js index c3f117647..bee4c4ef9 100644 --- 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