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

@@ -1,12 +1,12 @@
import { AppState } from '@/UIModels/AppState'
import { ViewControllerManager } from '@/Services/ViewControllerManager'
type Props = {
appState: AppState
viewControllerManager: ViewControllerManager
onViewNote: () => void
hasProtectionSources: boolean
}
const ProtectedNoteOverlay = ({ appState, onViewNote, hasProtectionSources }: Props) => {
const ProtectedNoteOverlay = ({ viewControllerManager, onViewNote, hasProtectionSources }: Props) => {
const instructionText = hasProtectionSources
? 'Authenticate to view this note.'
: 'Add a passcode or create an account to require authentication to view this note.'
@@ -20,7 +20,7 @@ const ProtectedNoteOverlay = ({ appState, onViewNote, hasProtectionSources }: Pr
<button
className="sn-button small info"
onClick={() => {
appState.accountMenu.setShow(true)
viewControllerManager.accountMenuController.setShow(true)
}}
>
Open account menu