fix: template note getting unselected after typing

This commit is contained in:
Aman Harwara
2022-10-21 16:58:28 +05:30
parent 856e499d89
commit d3ed4391b7

View File

@@ -401,15 +401,15 @@ export class ItemListController
const activeItem = activeController?.item
if (this.shouldSelectFirstItem(itemsReloadSource)) {
if (this.shouldSelectActiveItem(activeItem) && activeItem) {
await this.selectionController.selectItem(activeItem.uuid).catch(console.error)
} else if (this.shouldSelectFirstItem(itemsReloadSource)) {
await this.selectFirstItem()
} else if (this.shouldCloseActiveItem(activeItem) && activeController) {
this.closeItemController(activeController)
this.selectionController.selectNextItem()
} else if (this.shouldSelectNextItemOrCreateNewNote(activeItem)) {
await this.selectNextItemOrCreateNewNote()
} else if (this.shouldSelectActiveItem(activeItem) && activeItem) {
await this.selectionController.selectItem(activeItem.uuid).catch(console.error)
}
}