refactor: revert to passing note uuid to selectNote

This commit is contained in:
Antonella Sgarlatta
2021-05-11 19:19:53 -03:00
parent 8302733a49
commit ba71b56f00

View File

@@ -119,7 +119,9 @@ export class NotesState {
}, notesToSelect); }, notesToSelect);
} }
async selectNote(note: SNNote): Promise<void> { async selectNote(uuid: UuidString): Promise<void> {
const note = this.application.findItem(uuid) as SNNote;
if (note) {
if ( if (
this.io.activeModifiers.has( this.io.activeModifiers.has(
KeyboardModifier.Meta || KeyboardModifier.Ctrl KeyboardModifier.Meta || KeyboardModifier.Ctrl
@@ -148,6 +150,7 @@ export class NotesState {
} }
} }
} }
}
private async openEditor(noteUuid: string): Promise<void> { private async openEditor(noteUuid: string): Promise<void> {
if (this.activeEditor?.note?.uuid === noteUuid) { if (this.activeEditor?.note?.uuid === noteUuid) {