This commit is contained in:
machiav3lli 2022-05-04 03:45:14 +02:00
parent fbc4f04ff2
commit 9aba7d289a
2 changed files with 1 additions and 25 deletions

View File

@ -115,7 +115,7 @@ class ExploreFragment : MainNavFragmentX() {
*categories.sorted().toTypedArray() *categories.sorted().toTypedArray()
) )
) { ) {
viewModel.setSection( viewModel.sections.postValue(
when (it) { when (it) {
getString(R.string.all_applications) -> Section.All getString(R.string.all_applications) -> Section.All
else -> Section.Category(it) else -> Section.Category(it)

View File

@ -129,30 +129,6 @@ class MainNavFragmentViewModelX(
} }
} }
fun setSection(newSection: Section) {
viewModelScope.launch {
if (newSection != sections.value) {
sections.value = newSection
}
}
}
fun setOrder(newOrder: Order) {
viewModelScope.launch {
if (newOrder != order.value) {
order.value = newOrder
}
}
}
fun setSearchQuery(newSearchQuery: String) {
viewModelScope.launch {
if (newSearchQuery != searchQuery.value) {
searchQuery.value = newSearchQuery
}
}
}
class Factory( class Factory(
val db: DatabaseX, val db: DatabaseX,
private val primarySource: Source, private val primarySource: Source,