Skip to content

Commit ec7d397

Browse files
authored
Merge pull request #2985 from standardnotes/fix/multiple-selection-issues
fix: multiple selection issues
2 parents f4c64b8 + 99c7cb9 commit ec7d397

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

packages/web/src/javascripts/Controllers/ItemList/ItemListController.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,9 @@ export class ItemListController
269269
this.disposers.push(
270270
reaction(
271271
() => this.selectedItemsCount,
272-
(count, prevCount) => {
272+
(count) => {
273273
const hasNoSelectedItem = count === 0
274-
const onlyOneSelectedItemAfterChange = prevCount > count && count === 1
275-
if (hasNoSelectedItem || onlyOneSelectedItemAfterChange) {
274+
if (hasNoSelectedItem) {
276275
this.cancelMultipleSelection()
277276
}
278277
},
@@ -1187,7 +1186,7 @@ export class ItemListController
11871186
if (userTriggered && hasShift && !isMobileScreen()) {
11881187
await this.selectItemsRange({ selectedItem: item })
11891188
} else if (userTriggered && this.isMultipleSelectionMode) {
1190-
if (this.selectedUuids.has(uuid) && hasMoreThanOneSelected) {
1189+
if (this.selectedUuids.has(uuid)) {
11911190
this.removeSelectedItem(uuid)
11921191
} else if (isAuthorizedForAccess) {
11931192
this.selectedUuids.add(uuid)

0 commit comments

Comments
 (0)