feat: switch to notes view when creating new note (#1058)

This commit is contained in:
Aman Harwara
2022-06-01 13:59:29 +05:30
committed by GitHub
parent ef8fc83e36
commit 4aacdda51c

View File

@@ -379,15 +379,18 @@ export class ContentListViewState extends AbstractState {
createNewNote = async () => {
this.appState.notes.unselectNotes()
this.appState.tags.selected = this.appState.tags.smartViews.find((view) => view.uuid === SystemViewId.AllNotes)
let title = `Note ${this.notes.length + 1}`
if (this.isFiltering) {
title = this.noteFilterText
}
setTimeout(async () => {
let title = `Note ${this.notes.length + 1}`
if (this.isFiltering) {
title = this.noteFilterText
}
await this.appState.notes.createNewNoteController(title)
await this.appState.notes.createNewNoteController(title)
this.appState.noteTags.reloadTags()
this.appState.noteTags.reloadTags()
})
}
createPlaceholderNote = () => {