This commit is contained in:
YourAutisticLife 2024-04-26 18:07:04 +00:00 committed by GitHub
commit 9ce5244138
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 2 deletions

View File

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

View File

@ -24,6 +24,7 @@ export const followAccountSuccess = createAction(
'accounts/followAccount/SUCCESS',
actionWithSkipLoadingTrue<{
relationship: ApiRelationshipJSON;
statuses: unknown;
alreadyFollowing: boolean;
}>,
);

View File

@ -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,
@ -208,6 +209,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: