From d9f285c072482bf3f2551cb915e2c7d1fce7b4ee Mon Sep 17 00:00:00 2001 From: Qian Date: Fri, 10 Oct 2025 10:16:36 +0800 Subject: [PATCH] Remove cross-tab localStorage synchronization --- gui/src/context/LocalStorage.tsx | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/gui/src/context/LocalStorage.tsx b/gui/src/context/LocalStorage.tsx index d5864f895..bcda2698e 100644 --- a/gui/src/context/LocalStorage.tsx +++ b/gui/src/context/LocalStorage.tsx @@ -34,21 +34,6 @@ export const LocalStorageProvider: React.FC<{ children: React.ReactNode }> = ({ syncWithLocalStorage(); }, []); - // Listen for localStorage changes from other tabs - useEffect(() => { - const handleStorageChange = (event: StorageEvent) => { - if (event.key === "fontSize") { - syncWithLocalStorage(); - } - }; - - window.addEventListener("storage", handleStorageChange); - - return () => { - window.removeEventListener("storage", handleStorageChange); - }; - }, []); - // Listen for current tab changes using CustomEvent useEffect(() => { const handleLocalStorageChange = (event: CustomEvent) => {