fix: item selection/unselection on deleting

This commit is contained in:
Aman Harwara
2022-10-21 17:09:24 +05:30
parent d3ed4391b7
commit 4a1612c7dc

View File

@@ -401,13 +401,13 @@ export class ItemListController
const activeItem = activeController?.item
if (this.shouldSelectActiveItem(activeItem) && activeItem) {
if (this.shouldCloseActiveItem(activeItem) && activeController) {
this.closeItemController(activeController)
this.selectionController.selectNextItem()
} else 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()
}