mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 00:08:46 +00:00
[Glitch] Fix createDataLoadingThunk and related actions
Port b6fd14f0e2 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user