Skip to content

Commit 5f96dd2

Browse files
committed
Upload file
1 parent f5c38d1 commit 5f96dd2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

common/src/main/java/com/omarea/common/ui/DialogAppChooser.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ class DialogAppChooser(
4646
if (multiple) {
4747
val adapter = absListView.adapter as? AdapterAppChooser
4848
selectAll.visibility = View.VISIBLE
49-
selectAll.isChecked = packages.count { it.selected } == packages.size
49+
selectAll.isChecked =
50+
packages.isNotEmpty() &&
51+
packages.size > 1 &&
52+
packages.count { it.selected } == packages.size
5053

5154
selectAll.setOnClickListener {
5255
adapter?.setSelectAllState((it as CompoundButton).isChecked)
@@ -115,7 +118,6 @@ class DialogAppChooser(
115118

116119
fun showLoading(show: Boolean) {
117120
loadingView?.visibility = if (show) View.VISIBLE else View.GONE
118-
view?.findViewById<CompoundButton?>(R.id.select_all)?.isEnabled = !show
119121
}
120122

121123
fun notifyDataChanged() {

0 commit comments

Comments
 (0)