mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 03:00:33 +02:00
Profile editing: Fix bug with reordering (#38147)
This commit is contained in:
@@ -212,11 +212,9 @@ export const ReorderFieldsModal: FC<DialogModalProps> = ({ onClose }) => {
|
||||
return;
|
||||
}
|
||||
newFields.push({ name: field.name, value: field.value });
|
||||
|
||||
void dispatch(patchProfile({ fields_attributes: newFields })).then(
|
||||
onClose,
|
||||
);
|
||||
}
|
||||
|
||||
void dispatch(patchProfile({ fields_attributes: newFields })).then(onClose);
|
||||
}, [dispatch, fieldKeys, fields, onClose]);
|
||||
|
||||
const emojis = useAppSelector((state) => state.custom_emojis);
|
||||
|
||||
@@ -221,7 +221,12 @@ export const patchProfile = createDataLoadingThunk(
|
||||
`${profileEditSlice.name}/patchProfile`,
|
||||
(params: Partial<ApiProfileUpdateParams>) => apiPatchProfile(params),
|
||||
transformProfile,
|
||||
{ useLoadingBar: false },
|
||||
{
|
||||
useLoadingBar: false,
|
||||
condition(_, { getState }) {
|
||||
return !getState().profileEdit.isPending;
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
export const selectFieldById = createAppSelector(
|
||||
|
||||
Reference in New Issue
Block a user