1
0
Fork 0
forked from gitea/nas

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:
Eugen Rochko 2017-10-13 16:44:02 +02:00 committed by GitHub
parent 95fe20b78a
commit 388d093beb
3 changed files with 13 additions and 3 deletions

View file

@ -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,
};
};