File tree Expand file tree Collapse file tree
common/src/main/java/com/omarea/common/ui Expand file tree Collapse file tree Original file line number Diff line number Diff 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 () {
You can’t perform that action at this time.
0 commit comments