fix: item selection/unselection on deleting
This commit is contained in:
@@ -401,13 +401,13 @@ export class ItemListController
|
|||||||
|
|
||||||
const activeItem = activeController?.item
|
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)
|
await this.selectionController.selectItem(activeItem.uuid).catch(console.error)
|
||||||
} else if (this.shouldSelectFirstItem(itemsReloadSource)) {
|
} else if (this.shouldSelectFirstItem(itemsReloadSource)) {
|
||||||
await this.selectFirstItem()
|
await this.selectFirstItem()
|
||||||
} else if (this.shouldCloseActiveItem(activeItem) && activeController) {
|
|
||||||
this.closeItemController(activeController)
|
|
||||||
this.selectionController.selectNextItem()
|
|
||||||
} else if (this.shouldSelectNextItemOrCreateNewNote(activeItem)) {
|
} else if (this.shouldSelectNextItemOrCreateNewNote(activeItem)) {
|
||||||
await this.selectNextItemOrCreateNewNote()
|
await this.selectNextItemOrCreateNewNote()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user