From 6000c36c69483a6456c33fa389b046766c94ec4e Mon Sep 17 00:00:00 2001 From: fallenbagel <98979876+Fallenbagel@users.noreply.github.com> Date: Tue, 9 Dec 2025 05:18:49 +0800 Subject: [PATCH] fix(quick-connect): prevent multiple initiations of Quick Connect --- src/components/Login/JellyfinQuickConnectModal.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/Login/JellyfinQuickConnectModal.tsx b/src/components/Login/JellyfinQuickConnectModal.tsx index 8ffa6257..38ed7839 100644 --- a/src/components/Login/JellyfinQuickConnectModal.tsx +++ b/src/components/Login/JellyfinQuickConnectModal.tsx @@ -41,6 +41,7 @@ const JellyfinQuickConnectModal = ({ const [isExpired, setIsExpired] = useState(false); const pollingInterval = useRef(); const isMounted = useRef(true); + const hasInitiated = useRef(false); useEffect(() => { isMounted.current = true; @@ -149,8 +150,12 @@ const JellyfinQuickConnectModal = ({ }, [startPolling, onError, intl]); useEffect(() => { - initiateQuickConnect(); - }, [initiateQuickConnect]); + if (!hasInitiated.current) { + hasInitiated.current = true; + initiateQuickConnect(); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); const handleTryAgain = () => { initiateQuickConnect();