mirror of
https://github.com/dergigi/boris.git
synced 2026-01-02 22:44:31 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user