Skip to content

Commit

Permalink
fix: item selection/unselection on deleting
Browse files Browse the repository at this point in the history
  • Loading branch information
amanharwara committed Oct 21, 2022
1 parent d3ed439 commit 4a1612c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 4a1612c

Please sign in to comment.