refactor: pass sub controllers to controllers instead of passing global controller manager (#1061)

This commit is contained in:
Mo
2022-06-01 12:56:30 -05:00
committed by GitHub
parent 721cf8df35
commit a87e3b98e2
40 changed files with 672 additions and 591 deletions

View File

@@ -35,6 +35,7 @@ import {
} from './TransactionFunctions'
import { reloadFont } from './FontFunctions'
import { NoteViewProps } from './NoteViewProps'
import { WebAppEvent } from '@/Application/WebAppEvent'
const MINIMUM_STATUS_DURATION = 400
const TEXTAREA_DEBOUNCE = 100
@@ -588,7 +589,7 @@ class NoteView extends PureComponent<NoteViewProps, State> {
onContentFocus = () => {
if (this.lastEditorFocusEventSource) {
this.application.getViewControllerManager().editorDidFocus(this.lastEditorFocusEventSource)
this.application.notifyWebEvent(WebAppEvent.EditorFocused, { eventSource: this.lastEditorFocusEventSource })
}
this.lastEditorFocusEventSource = undefined
}