fix: Fixes unselecting note deactivating multiple selection note when there is only one selected note left

This commit is contained in:
Antonella Sgarlatta
2026-02-20 23:57:10 -03:00
parent 5e53ec3ff7
commit 36f973aa3f

View File

@@ -269,10 +269,9 @@ export class ItemListController
this.disposers.push(
reaction(
() => this.selectedItemsCount,
(count, prevCount) => {
(count) => {
const hasNoSelectedItem = count === 0
const onlyOneSelectedItemAfterChange = prevCount > count && count === 1
if (hasNoSelectedItem || onlyOneSelectedItemAfterChange) {
if (hasNoSelectedItem) {
this.cancelMultipleSelection()
}
},