When unfollowing, remove from home in web UI immediately (#5369)
Do NOT send "delete" through streaming API when unmerging from home timeline. "delete" implies that the original status was deleted, which is not true!
This commit is contained in:
parent
95fe20b78a
commit
388d093beb
3 changed files with 13 additions and 3 deletions
|
@ -122,7 +122,7 @@ export function unfollowAccount(id) {
|
|||
dispatch(unfollowAccountRequest(id));
|
||||
|
||||
api(getState).post(`/api/v1/accounts/${id}/unfollow`).then(response => {
|
||||
dispatch(unfollowAccountSuccess(response.data));
|
||||
dispatch(unfollowAccountSuccess(response.data, getState().get('statuses')));
|
||||
}).catch(error => {
|
||||
dispatch(unfollowAccountFail(error));
|
||||
});
|
||||
|
@ -157,10 +157,11 @@ export function unfollowAccountRequest(id) {
|
|||
};
|
||||
};
|
||||
|
||||
export function unfollowAccountSuccess(relationship) {
|
||||
export function unfollowAccountSuccess(relationship, statuses) {
|
||||
return {
|
||||
type: ACCOUNT_UNFOLLOW_SUCCESS,
|
||||
relationship,
|
||||
statuses,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue