fix: assign active tag when creating a new note

This commit is contained in:
Baptiste Grob
2020-11-16 17:00:01 +01:00
parent 0f84a6cbad
commit d49d2e996b
3 changed files with 34 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
import { removeFromArray } from 'snjs';
import { removeFromArray, UuidString } from 'snjs';
import { Editor } from './editor';
import { WebApplication } from './application';
@@ -21,8 +21,12 @@ export class EditorGroup {
}
}
createEditor(noteUuid?: string, noteTitle?: string) {
const editor = new Editor(this.application, noteUuid, noteTitle);
createEditor(
noteUuid?: string,
noteTitle?: string,
noteTag?: UuidString
) {
const editor = new Editor(this.application, noteUuid, noteTitle, noteTag);
this.editors.push(editor);
this.notifyObservers();
}
@@ -72,4 +76,4 @@ export class EditorGroup {
observer();
}
}
}
}