fix: Fixed font size not updating on plain editor when changing it from Preferences (#2920)
This commit is contained in:
committed by
GitHub
parent
fa4182ba9f
commit
0d17961570
@@ -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])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user