Skip to content
Snippets Groups Projects
Commit f3003417 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

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

parent 33ea042d
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment