mirror of https://github.com/mastodon/mastodon
filter home when boosts are hidden
This commit is contained in:
parent
cc3ff66246
commit
c429131800
|
@ -147,7 +147,7 @@ export function followAccount(id, options = { reblogs: true }) {
|
|||
dispatch(followAccountRequest({ id, locked }));
|
||||
|
||||
api(getState).post(`/api/v1/accounts/${id}/follow`, options).then(response => {
|
||||
dispatch(followAccountSuccess({relationship: response.data, alreadyFollowing}));
|
||||
dispatch(followAccountSuccess({relationship: response.data, statuses: getState().get('statuses'), alreadyFollowing}));
|
||||
}).catch(error => {
|
||||
dispatch(followAccountFail({ id, error, locked }));
|
||||
});
|
||||
|
|
|
@ -24,6 +24,7 @@ export const followAccountSuccess = createAction(
|
|||
'accounts/followAccount/SUCCESS',
|
||||
actionWithSkipLoadingTrue<{
|
||||
relationship: ApiRelationshipJSON;
|
||||
statuses: unknown;
|
||||
alreadyFollowing: boolean;
|
||||
}>,
|
||||
);
|
||||
|
|
|
@ -3,7 +3,8 @@ import { Map as ImmutableMap, List as ImmutableList, OrderedSet as ImmutableOrde
|
|||
import {
|
||||
blockAccountSuccess,
|
||||
muteAccountSuccess,
|
||||
unfollowAccountSuccess
|
||||
unfollowAccountSuccess,
|
||||
followAccountSuccess
|
||||
} from '../actions/accounts';
|
||||
import {
|
||||
TIMELINE_UPDATE,
|
||||
|
@ -203,6 +204,7 @@ export default function timelines(state = initialState, action) {
|
|||
case blockAccountSuccess.type:
|
||||
case muteAccountSuccess.type:
|
||||
return filterTimelines(state, action.payload.relationship, action.payload.statuses);
|
||||
case followAccountSuccess.type:
|
||||
case unfollowAccountSuccess.type:
|
||||
return filterTimeline('home', state, action.payload.relationship, action.payload.statuses);
|
||||
case TIMELINE_SCROLL_TOP:
|
||||
|
|
Loading…
Reference in New Issue