From 87187e8b287c5e7e4a1b293a264a75646d5be136 Mon Sep 17 00:00:00 2001 From: 0xsysr3ll <0xsysr3ll@pm.me> Date: Wed, 25 Feb 2026 22:37:08 +0100 Subject: [PATCH] fix(settings): revalidate user after media server switch --- src/components/Settings/SettingsPlex.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/Settings/SettingsPlex.tsx b/src/components/Settings/SettingsPlex.tsx index 633d48071..eec099320 100644 --- a/src/components/Settings/SettingsPlex.tsx +++ b/src/components/Settings/SettingsPlex.tsx @@ -8,6 +8,7 @@ import PlexLoginButton from '@app/components/Login/PlexLoginButton'; import LibraryItem from '@app/components/Settings/LibraryItem'; import SettingsBadge from '@app/components/Settings/SettingsBadge'; import useSettings from '@app/hooks/useSettings'; +import { useUser } from '@app/hooks/useUser'; import globalMessages from '@app/i18n/globalMessages'; import defineMessages from '@app/utils/defineMessages'; import { isValidURL } from '@app/utils/urlValidationHelper'; @@ -139,6 +140,7 @@ const SettingsPlex = ({ onComplete }: SettingsPlexProps) => { const intl = useIntl(); const { addToast, removeToast } = useToasts(); const settings = useSettings(); + const { revalidate: revalidateUser } = useUser(); const PlexSettingsSchema = Yup.object().shape({ hostname: Yup.string() @@ -376,6 +378,7 @@ const SettingsPlex = ({ onComplete }: SettingsPlexProps) => { } ); revalidate(); + revalidateUser(); } catch (e) { addToast( axios.isAxiosError(e) && e.response?.data?.message