Skip to content

Commit

Permalink
Updated MultiSelectFragment.kt
Browse files Browse the repository at this point in the history
Co-authored-by: Abdourahamane Boinaidi <[email protected]>
Signed-off-by: Kevin Boulongne <[email protected]>
  • Loading branch information
KevinBoulongne and sirambd committed Mar 9, 2022
1 parent ce922a1 commit df0e962
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,7 @@ abstract class MultiSelectFragment : Fragment(), MultiSelectResult {

fun onItemSelected(selectedNumber: Int? = null) {
val fileSelectedNumber = selectedNumber ?: multiSelectManager.getValidSelectedItems().size

when (fileSelectedNumber) {
0, 1 -> {
val isEnabled = fileSelectedNumber == 1
enableMultiSelectButtons(isEnabled)
}
}

if (fileSelectedNumber in 0..1) enableMultiSelectButtons(fileSelectedNumber == 1)
multiSelectLayout?.titleMultiSelect?.text = resources.getQuantityString(
R.plurals.fileListMultiSelectedTitle, fileSelectedNumber, fileSelectedNumber
)
Expand Down

0 comments on commit df0e962

Please sign in to comment.