Fix createDataLoadingThunk and related actions (#30408)

This commit is contained in:
Renaud Chaput 2024-05-23 20:22:42 +02:00 committed by GitHub
parent 133d98fb25
commit b6fd14f0e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 41 additions and 35 deletions

View file

@ -122,13 +122,13 @@ export default function statuses(state = initialState, action) {
return statusTranslateUndo(state, action.id);
default:
if(reblog.pending.match(action))
return state.setIn([action.meta.params.statusId, 'reblogged'], true);
return state.setIn([action.meta.arg.statusId, 'reblogged'], true);
else if(reblog.rejected.match(action))
return state.get(action.meta.params.statusId) === undefined ? state : state.setIn([action.meta.params.statusId, 'reblogged'], false);
return state.get(action.meta.arg.statusId) === undefined ? state : state.setIn([action.meta.arg.statusId, 'reblogged'], false);
else if(unreblog.pending.match(action))
return state.setIn([action.meta.params.statusId, 'reblogged'], false);
return state.setIn([action.meta.arg.statusId, 'reblogged'], false);
else if(unreblog.rejected.match(action))
return state.get(action.meta.params.statusId) === undefined ? state : state.setIn([action.meta.params.statusId, 'reblogged'], true);
return state.get(action.meta.arg.statusId) === undefined ? state : state.setIn([action.meta.arg.statusId, 'reblogged'], true);
else
return state;
}