Explorar o código

Allow FilterList to be passed with default values (#5716)

Arraiment %!s(int64=3) %!d(string=hai) anos
pai
achega
91fbccdbaa

+ 2 - 3
app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt

@@ -144,10 +144,9 @@ open class BrowseSourceController(bundle: Bundle) :
         filterSheet = SourceFilterSheet(
             activity!!,
             onFilterClicked = {
-                val allDefault = presenter.sourceFilters == presenter.source.getFilterList()
                 showProgressBar()
                 adapter?.clear()
-                presenter.setSourceFilter(if (allDefault) FilterList() else presenter.sourceFilters)
+                presenter.setSourceFilter(presenter.sourceFilters)
             },
             onResetClicked = {
                 presenter.appliedFilters = FilterList()
@@ -332,7 +331,7 @@ open class BrowseSourceController(bundle: Bundle) :
         showProgressBar()
         adapter?.clear()
 
-        presenter.restartPager(newQuery)
+        presenter.restartPager(newQuery, presenter.sourceFilters)
     }
 
     /**