mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
When unreblog arrives over streaming API, just delete in UI (#5439)
This commit is contained in:
parent
33ea042dec
commit
f3003417c5
@ -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.keySeq().forEach(timeline => {
|
||||||
state = state.updateIn([timeline, 'items'], list => {
|
state = state.updateIn([timeline, 'items'], list => list.filterNot(item => item === id));
|
||||||
if (reblogOf && !list.includes(reblogOf)) {
|
|
||||||
return list.map(item => item === id ? reblogOf : item);
|
|
||||||
} else {
|
|
||||||
return list.filterNot(item => item === id);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Remove reblogs of deleted status
|
// Remove reblogs of deleted status
|
||||||
|
Loading…
Reference in New Issue
Block a user