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,6 +1,6 @@
import { NoteViewController } from '@standardnotes/snjs'
import { PureComponent } from '@/Components/Abstract/PureComponent'
import { WebApplication } from '@/UIModels/Application'
import { WebApplication } from '@/Application/Application'
import MultipleSelectedNotes from '@/Components/MultipleSelectedNotes/MultipleSelectedNotes'
import NoteView from '@/Components/NoteView/NoteView'
import { ElementIds } from '@/ElementIDs'
@@ -37,9 +37,9 @@ class NoteGroupView extends PureComponent<Props, State> {
})
this.autorun(() => {
if (this.appState && this.appState.notes) {
if (this.viewControllerManager && this.viewControllerManager.notesController) {
this.setState({
showMultipleSelectedNotes: this.appState.notes.selectedNotesCount > 1,
showMultipleSelectedNotes: this.viewControllerManager.notesController.selectedNotesCount > 1,
})
}
})
@@ -56,7 +56,7 @@ class NoteGroupView extends PureComponent<Props, State> {
return (
<div id={ElementIds.EditorColumn} className="h-full app-column app-column-third">
{this.state.showMultipleSelectedNotes && (
<MultipleSelectedNotes application={this.application} appState={this.appState} />
<MultipleSelectedNotes application={this.application} viewControllerManager={this.viewControllerManager} />
)}
{!this.state.showMultipleSelectedNotes && (