diff --git a/src/components/Settings/SettingsMain.tsx b/src/components/Settings/SettingsMain.tsx index 70b3fec9e..4b76806e0 100644 --- a/src/components/Settings/SettingsMain.tsx +++ b/src/components/Settings/SettingsMain.tsx @@ -3,7 +3,7 @@ import { Field, Form, Formik } from 'formik'; import React, { useMemo } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; -import useSWR from 'swr'; +import useSWR, { mutate } from 'swr'; import * as Yup from 'yup'; import type { Language, MainSettings } from '../../../server/lib/settings'; import { Permission, useUser } from '../../hooks/useUser'; @@ -162,6 +162,7 @@ const SettingsMain: React.FC = () => { trustProxy: values.trustProxy, cacheImages: values.cacheImages, }); + mutate('/api/v1/settings/public'); addToast(intl.formatMessage(messages.toastSettingsSuccess), { autoDismiss: true, diff --git a/src/components/Settings/SettingsServices.tsx b/src/components/Settings/SettingsServices.tsx index d47eb2752..2eb978eb7 100644 --- a/src/components/Settings/SettingsServices.tsx +++ b/src/components/Settings/SettingsServices.tsx @@ -1,7 +1,7 @@ import axios from 'axios'; import React, { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; -import useSWR from 'swr'; +import useSWR, { mutate } from 'swr'; import type { RadarrSettings, SonarrSettings, @@ -213,6 +213,7 @@ const SettingsServices: React.FC = () => { setDeleteServerModal({ open: false, serverId: null, type: 'radarr' }); revalidateRadarr(); revalidateSonarr(); + mutate('/api/v1/settings/public'); }; return ( @@ -237,6 +238,7 @@ const SettingsServices: React.FC = () => { onClose={() => setEditRadarrModal({ open: false, radarr: null })} onSave={() => { revalidateRadarr(); + mutate('/api/v1/settings/public'); setEditRadarrModal({ open: false, radarr: null }); }} /> @@ -247,6 +249,7 @@ const SettingsServices: React.FC = () => { onClose={() => setEditSonarrModal({ open: false, sonarr: null })} onSave={() => { revalidateSonarr(); + mutate('/api/v1/settings/public'); setEditSonarrModal({ open: false, sonarr: null }); }} />