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

lolsob-rspec
Eugen Rochko 2017-10-17 22:17:02 +02:00 committed by GitHub
parent a18201f690
commit 8eee4b3d35
1 changed files with 2 additions and 8 deletions

View File

@ -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