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(() => {
|
useEffect(() => {
|
||||||
reloadPreferences()
|
reloadPreferences()
|
||||||
|
|
||||||
return application.addSingleEventObserver(ApplicationEvent.PreferencesChanged, async () => {
|
return application.addEventObserver(async (event) => {
|
||||||
reloadPreferences()
|
const events = [ApplicationEvent.PreferencesChanged, ApplicationEvent.LocalPreferencesChanged]
|
||||||
|
if (events.includes(event)) {
|
||||||
|
reloadPreferences()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}, [reloadPreferences, application])
|
}, [reloadPreferences, application])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user