Fix download conversion change detection

The setting was considered to have always been modified. This resulted in the save button never being disabled.
This commit is contained in:
schroda
2025-07-26 00:41:25 +02:00
parent bd6653ff88
commit a846a84777
2 changed files with 25 additions and 12 deletions

View File

@@ -108,10 +108,11 @@ export const DownloadSettings = () => {
const updateSetting = <Setting extends keyof DownloadSettingsType>(
setting: Setting,
value: DownloadSettingsType[Setting],
) => {
mutateSettings({ variables: { input: { settings: { [setting]: value } } } }).catch((e) =>
makeToast(t('global.error.label.failed_to_save_changes'), 'error', getErrorMessage(e)),
);
): Promise<any> => {
const mutation = mutateSettings({ variables: { input: { settings: { [setting]: value } } } });
mutation.catch((e) => makeToast(t('global.error.label.failed_to_save_changes'), 'error', getErrorMessage(e)));
return mutation;
};
const updateMetadataSetting = createUpdateMetadataServerSettings<keyof MetadataDownloadSettings>((e) =>