Don't allow app selection toggles before icons have loaded

This commit is contained in:
Torsten Grote 2024-08-28 13:34:46 -03:00
parent 5418a8ef12
commit 7214d9c666
No known key found for this signature in database
GPG key ID: 3E5F77D92CF891FF

View file

@ -144,9 +144,6 @@ internal class AppSelectionAdapter(
fun bind(item: SelectableAppItem) {
v.background = clickableBackground
v.setOnClickListener {
checkBox.toggle()
}
checkBox.setOnCheckedChangeListener(null)
checkBox.isChecked = item.selected
@ -155,6 +152,11 @@ internal class AppSelectionAdapter(
}
checkBox.visibility = if (item.hasIcon == null) INVISIBLE else VISIBLE
progressBar.visibility = if (item.hasIcon == null) VISIBLE else INVISIBLE
if (item.hasIcon == null) {
v.setOnClickListener(null)
} else v.setOnClickListener {
checkBox.toggle()
}
val isSpecial = item.metadata.isInternalSystem
appIcon.scaleType = FIT_CENTER