Skip to content

Commit c2ebfd1

Browse files
authored
Merge pull request #4452 from Rahulraj888/issue-4327
fix: selected item is unselected after clicking 'Select All' when there is only one item in the directory
2 parents 119d719 + 4d3e85e commit c2ebfd1

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

app/src/main/java/com/amaze/filemanager/ui/selection/SelectionPopupMenu.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,12 @@ class SelectionPopupMenu(
8484
when (item?.itemId) {
8585
R.id.select_all -> {
8686
// select_all
87-
recyclerAdapter.toggleChecked(
88-
!recyclerAdapter
89-
.areAllChecked(currentPath),
90-
currentPath,
91-
)
87+
if (!recyclerAdapter.areAllChecked(currentPath)) {
88+
recyclerAdapter.toggleChecked(
89+
true,
90+
currentPath,
91+
)
92+
}
9293
}
9394
R.id.select_inverse -> {
9495
recyclerAdapter.toggleInverse(currentPath)

0 commit comments

Comments
 (0)