fix: item selection/unselection on deleting
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user