Update BrowseSourcePresenter.kt (#8040)

Set filters to default when reset is pressed.
This commit is contained in:
happywillow0 2022-09-21 14:27:38 -04:00 committed by GitHub
parent 2ced56e490
commit ec34977a64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -160,8 +160,9 @@ open class BrowseSourcePresenter(
} }
fun resetFilter() { fun resetFilter() {
state.filters = source!!.getFilterList()
if (currentFilter !is Filter.UserInput) return if (currentFilter !is Filter.UserInput) return
state.currentFilter = (currentFilter as Filter.UserInput).copy(filters = source!!.getFilterList()) state.currentFilter = (currentFilter as Filter.UserInput).copy(filters = state.filters)
} }
fun search(query: String? = null) { fun search(query: String? = null) {