fix: Fixed font size not updating on plain editor when changing it from Preferences (#2920)

This commit is contained in:
Antonella Sgarlatta
2025-07-29 12:30:29 -03:00
committed by GitHub
parent fa4182ba9f
commit 0d17961570

View File

@@ -190,8 +190,11 @@ export const PlainEditor = forwardRef<PlainEditorInterface, Props>(
useEffect(() => {
reloadPreferences()
return application.addSingleEventObserver(ApplicationEvent.PreferencesChanged, async () => {
reloadPreferences()
return application.addEventObserver(async (event) => {
const events = [ApplicationEvent.PreferencesChanged, ApplicationEvent.LocalPreferencesChanged]
if (events.includes(event)) {
reloadPreferences()
}
})
}, [reloadPreferences, application])