From 89c00035a892185ca6b526ba1669ab4d0ea8e055 Mon Sep 17 00:00:00 2001 From: Gigi Date: Sun, 5 Oct 2025 03:55:15 +0100 Subject: [PATCH] refactor: remove debounce from settings auto-save - Settings now save immediately when changed - Remove setTimeout debounce logic - Keep code simple and straightforward --- src/components/Settings.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx index 3a924fee..03647136 100644 --- a/src/components/Settings.tsx +++ b/src/components/Settings.tsx @@ -39,11 +39,7 @@ const Settings: React.FC = ({ settings, onSave, onClose }) => { return } - const timer = setTimeout(() => { - onSave(localSettings) - }, 500) // Debounce for 500ms - - return () => clearTimeout(timer) + onSave(localSettings) }, [localSettings, onSave]) const previewFontFamily = getFontFamily(localSettings.readingFont)