From 8c0cafc7933db13b097df6fa11fb2faaae52f1af Mon Sep 17 00:00:00 2001 From: arkon Date: Thu, 30 Apr 2020 20:22:52 -0400 Subject: [PATCH] Reword action button in source filter sheet (closes #2994) --- .../browse/source/browse/BrowseSourceController.kt | 2 +- .../ui/browse/source/browse/SourceFilterSheet.kt | 12 ++++++------ app/src/main/res/layout/source_filter_sheet.xml | 4 ++-- 3 files changed, 9 insertions(+), 9 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 5a449120d9..85c360b957 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 0c462e2841..4853a058f7 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 f7e1b2f7a8..87ec9dbfc5 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" />