diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt index f813c8fc5..5a65b9a7e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/browse/BrowseCatalogueController.kt @@ -125,7 +125,12 @@ open class BrowseCatalogueController(bundle: Bundle) : setupRecycler(view) // Prepare filter sheet - initFilterSheet() + if (presenter.sourceFilters.isNotEmpty()) { + initFilterSheet() + + binding.fabFilter.setOnClickListener { filterSheet?.show() } + binding.fabFilter.visible() + } binding.progress.visible() } @@ -245,18 +250,6 @@ open class BrowseCatalogueController(bundle: Bundle) : } ) - // Setup filters button - menu.findItem(R.id.action_set_filter).apply { - icon.mutate() - if (presenter.sourceFilters.isEmpty()) { - isEnabled = false - icon.alpha = 128 - } else { - isEnabled = true - icon.alpha = 255 - } - } - // Show next display mode menu.findItem(R.id.action_display_mode).apply { val icon = if (presenter.isListMode) @@ -278,7 +271,6 @@ open class BrowseCatalogueController(bundle: Bundle) : when (item.itemId) { R.id.action_search -> expandActionViewFromInteraction = true R.id.action_display_mode -> swapDisplayMode() - R.id.action_set_filter -> filterSheet?.show() R.id.action_open_in_web_view -> openInWebView() } return super.onOptionsItemSelected(item) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/latest/LatestUpdatesController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/latest/LatestUpdatesController.kt index 12f4f9e93..f3e198f65 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/latest/LatestUpdatesController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/latest/LatestUpdatesController.kt @@ -23,6 +23,5 @@ class LatestUpdatesController(bundle: Bundle) : BrowseCatalogueController(bundle override fun onPrepareOptionsMenu(menu: Menu) { super.onPrepareOptionsMenu(menu) menu.findItem(R.id.action_search).isVisible = false - menu.findItem(R.id.action_set_filter).isVisible = false } } diff --git a/app/src/main/res/layout/catalogue_controller.xml b/app/src/main/res/layout/catalogue_controller.xml index 12b00bbd3..84bd97400 100644 --- a/app/src/main/res/layout/catalogue_controller.xml +++ b/app/src/main/res/layout/catalogue_controller.xml @@ -1,5 +1,6 @@ @@ -26,6 +27,14 @@ + + - - List Download badges Hide - Set filter Cancel Cancel all Sort