From b7bdd99cdde0a746a31226a11c52f9e25fe13c6a Mon Sep 17 00:00:00 2001 From: Gauvain Date: Wed, 15 Jul 2026 00:34:19 +0200 Subject: [PATCH] fix(streamystats): derive control enablement from the effective server URL --- .../(home)/settings/plugins/streamystats/page.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/(auth)/(tabs)/(home)/settings/plugins/streamystats/page.tsx b/app/(auth)/(tabs)/(home)/settings/plugins/streamystats/page.tsx index e4db9b302..a5a45519b 100644 --- a/app/(auth)/(tabs)/(home)/settings/plugins/streamystats/page.tsx +++ b/app/(auth)/(tabs)/(home)/settings/plugins/streamystats/page.tsx @@ -53,7 +53,12 @@ export default function StreamystatsPage() { pluginSettings?.streamyStatsPromotedWatchlists?.locked === true; const hideWatchlistsTabLocked = pluginSettings?.hideWatchlistsTab?.locked === true; - const isStreamystatsEnabled = !!url; + // The input renders the locked admin URL; enablement must follow the same + // effective value or every toggle stays disabled until local state syncs. + const effectiveUrl = isUrlLocked + ? (settings?.streamyStatsServerUrl ?? "") + : url; + const isStreamystatsEnabled = !!effectiveUrl; const onSave = useCallback(() => { const cleanUrl = url.endsWith("/") ? url.slice(0, -1) : url; @@ -139,9 +144,7 @@ export default function StreamystatsPage() { placeholder={t( "home.settings.plugins.streamystats.server_url_placeholder", )} - value={ - isUrlLocked ? (settings?.streamyStatsServerUrl ?? "") : url - } + value={effectiveUrl} keyboardType='url' returnKeyType='done' autoCapitalize='none'