Update BrowseSourcePresenter.kt (#8040)

Set filters to default when reset is pressed.
pull/8050/head
happywillow0 2 years ago committed by GitHub
parent 2ced56e490
commit ec34977a64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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) {

Loading…
Cancel
Save