mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-07-11 23:45:24 +00:00
Update: Replace deprecated function
This commit is contained in:
@ -86,13 +86,14 @@ class ExploreFragment : MainNavFragmentX() {
|
|||||||
val selectedSection = viewModel.sections.value
|
val selectedSection = viewModel.sections.value
|
||||||
check(
|
check(
|
||||||
children.filterNotNull()
|
children.filterNotNull()
|
||||||
.find { it is Chip && selectedSection is Category && it.text == selectedSection.name }?.id
|
.find { child ->
|
||||||
?: R.id.SHOW_ALL
|
child is Chip && selectedSection is Category && child.text == selectedSection.name
|
||||||
|
}?.id ?: R.id.SHOW_ALL
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
binding.categories.setOnCheckedChangeListener { group, checkedId ->
|
binding.categories.setOnCheckedStateChangeListener { group, checkedIds ->
|
||||||
group.findViewById<Chip>(checkedId).let {
|
group.findViewById<Chip>(checkedIds[0]).let {
|
||||||
viewModel.setSection(
|
viewModel.setSection(
|
||||||
if (it.text.equals(getString(R.string.all_applications)))
|
if (it.text.equals(getString(R.string.all_applications)))
|
||||||
Section.All
|
Section.All
|
||||||
|
Reference in New Issue
Block a user