refactor: rename states to view controllers (#1060)

This commit is contained in:
Mo
2022-06-01 10:15:45 -05:00
committed by GitHub
parent 78f39ec85d
commit 54125cec21
177 changed files with 1518 additions and 1365 deletions

View File

@@ -9,12 +9,12 @@ import { PreferencesProps } from './PreferencesProps'
const PreferencesView: FunctionComponent<PreferencesProps> = (props) => {
const menu = useMemo(
() => new PreferencesMenu(props.application, props.appState.enableUnfinishedFeatures),
[props.appState.enableUnfinishedFeatures, props.application],
() => new PreferencesMenu(props.application, props.viewControllerManager.enableUnfinishedFeatures),
[props.viewControllerManager.enableUnfinishedFeatures, props.application],
)
useEffect(() => {
menu.selectPane(props.appState.preferences.currentPane)
menu.selectPane(props.viewControllerManager.preferencesController.currentPane)
const removeEscKeyObserver = props.application.io.addKeyObserver({
key: 'Escape',
onKeyDown: (event) => {