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 5a449120d..85c360b95 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 @@ -137,7 +137,7 @@ open class BrowseSourceController(bundle: Bundle) : filterSheet = SourceFilterSheet( activity!!, - onSearchClicked = { + onFilterClicked = { val allDefault = presenter.sourceFilters == presenter.source.getFilterList() showProgressBar() adapter?.clear() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceFilterSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceFilterSheet.kt index 0c462e284..4853a058f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceFilterSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceFilterSheet.kt @@ -10,12 +10,12 @@ import eu.davidea.flexibleadapter.items.IFlexible import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.util.view.inflate import eu.kanade.tachiyomi.widget.SimpleNavigationView +import kotlinx.android.synthetic.main.source_filter_sheet.view.filter_btn import kotlinx.android.synthetic.main.source_filter_sheet.view.reset_btn -import kotlinx.android.synthetic.main.source_filter_sheet.view.search_btn class SourceFilterSheet( activity: Activity, - onSearchClicked: () -> Unit, + onFilterClicked: () -> Unit, onResetClicked: () -> Unit ) : BottomSheetDialog(activity) { @@ -23,8 +23,8 @@ class SourceFilterSheet( init { filterNavView = FilterNavigationView(activity) - filterNavView.onSearchClicked = { - onSearchClicked() + filterNavView.onFilterClicked = { + onFilterClicked() this.dismiss() } filterNavView.onResetClicked = onResetClicked @@ -39,7 +39,7 @@ class SourceFilterSheet( class FilterNavigationView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : SimpleNavigationView(context, attrs) { - var onSearchClicked = {} + var onFilterClicked = {} var onResetClicked = {} val adapter: FlexibleAdapter> = FlexibleAdapter>(null) @@ -52,7 +52,7 @@ class SourceFilterSheet( val view = inflate(R.layout.source_filter_sheet) ((view as ViewGroup).getChildAt(1) as ViewGroup).addView(recycler) addView(view) - search_btn.setOnClickListener { onSearchClicked() } + filter_btn.setOnClickListener { onFilterClicked() } reset_btn.setOnClickListener { onResetClicked() } } } diff --git a/app/src/main/res/layout/source_filter_sheet.xml b/app/src/main/res/layout/source_filter_sheet.xml index f7e1b2f7a..87ec9dbfc 100644 --- a/app/src/main/res/layout/source_filter_sheet.xml +++ b/app/src/main/res/layout/source_filter_sheet.xml @@ -37,12 +37,12 @@ app:layout_constraintTop_toTopOf="parent" />