mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-23 05:18:06 +01:00
Fix error when deleting a status (#30784)
This commit is contained in:
parent
bb2d77b4a0
commit
7d12522ed7
2 changed files with 3 additions and 3 deletions
|
@ -63,10 +63,10 @@ export function updateTimeline(timeline, status, accept) {
|
||||||
export function deleteFromTimelines(id) {
|
export function deleteFromTimelines(id) {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
const accountId = getState().getIn(['statuses', id, 'account']);
|
const accountId = getState().getIn(['statuses', id, 'account']);
|
||||||
const references = getState().get('statuses').filter(status => status.get('reblog') === id).map(status => status.get('id')).toJSON();
|
const references = getState().get('statuses').filter(status => status.get('reblog') === id).map(status => status.get('id')).valueSeq().toJSON();
|
||||||
const reblogOf = getState().getIn(['statuses', id, 'reblog'], null);
|
const reblogOf = getState().getIn(['statuses', id, 'reblog'], null);
|
||||||
|
|
||||||
dispatch(timelineDelete(id, accountId, references, reblogOf));
|
dispatch(timelineDelete({ statusId: id, accountId, references, reblogOf }));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -159,7 +159,7 @@ const filterTimelines = (state, relationship, statuses) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
references = statuses.filter(item => item.get('reblog') === status.get('id')).map(item => item.get('id'));
|
references = statuses.filter(item => item.get('reblog') === status.get('id')).map(item => item.get('id')).valueSeq().toJSON();
|
||||||
state = deleteStatus(state, status.get('id'), references, relationship.id);
|
state = deleteStatus(state, status.get('id'), references, relationship.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue