From 91fbccdbaa9f30bedd7758634aa01478270d1eed Mon Sep 17 00:00:00 2001 From: Arraiment <76941874+Arraiment@users.noreply.github.com> Date: Mon, 16 Aug 2021 05:06:32 +0800 Subject: [PATCH] Allow FilterList to be passed with default values (#5716) --- .../ui/browse/source/browse/BrowseSourceController.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt index d1809901b9..691c1af279 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt +++ b/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) } /**