Fix error when deleting a status (#30784)
parent
bb2d77b4a0
commit
7d12522ed7
|
@ -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 New Issue