Reword action button in source filter sheet (closes #2994)

This commit is contained in:
arkon 2020-04-30 20:22:52 -04:00
parent 543ca43e24
commit 8c0cafc793
3 changed files with 9 additions and 9 deletions

View File

@ -137,7 +137,7 @@ open class BrowseSourceController(bundle: Bundle) :
filterSheet = SourceFilterSheet(
activity!!,
onSearchClicked = {
onFilterClicked = {
val allDefault = presenter.sourceFilters == presenter.source.getFilterList()
showProgressBar()
adapter?.clear()

View File

@ -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<IFlexible<*>> = FlexibleAdapter<IFlexible<*>>(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() }
}
}

View File

@ -37,12 +37,12 @@
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/search_btn"
android:id="@+id/filter_btn"
style="@style/Theme.Widget.Button.FilledAccent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/action_search"
android:text="@string/action_filter"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />