refactor: remove debounce from settings auto-save

- Settings now save immediately when changed
- Remove setTimeout debounce logic
- Keep code simple and straightforward
This commit is contained in:
Gigi
2025-10-05 03:55:15 +01:00
parent 61307fc22d
commit 89c00035a8

View File

@@ -39,11 +39,7 @@ const Settings: React.FC<SettingsProps> = ({ 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)