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

master
Eugen Rochko 7 years ago committed by GitHub
parent 33ea042dec
commit f3003417c5
  1. 10
      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

Loading…
Cancel
Save