From cbf7e116d7520f8bf48a10a363c11f338482864c Mon Sep 17 00:00:00 2001 From: Jays2Kings Date: Mon, 19 Jul 2021 19:22:22 -0400 Subject: [PATCH] Fix source filter sheet not resizing when content inside changes --- .../kanade/tachiyomi/ui/source/browse/SourceFilterSheet.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/SourceFilterSheet.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/SourceFilterSheet.kt index 47193d70d4..7c5cb0efe8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/SourceFilterSheet.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/source/browse/SourceFilterSheet.kt @@ -85,6 +85,10 @@ class SourceFilterSheet(val activity: Activity) : } }) + binding.filtersRecycler.viewTreeObserver.addOnScrollChangedListener { + updateBottomButtons() + } + setOnShowListener { updateBottomButtons() } @@ -92,7 +96,7 @@ class SourceFilterSheet(val activity: Activity) : binding.filtersRecycler.layoutManager = androidx.recyclerview.widget.LinearLayoutManager(context) binding.filtersRecycler.clipToPadding = false binding.filtersRecycler.adapter = adapter - binding.filtersRecycler.setHasFixedSize(true) + binding.filtersRecycler.setHasFixedSize(false) sheetBehavior.addBottomSheetCallback( object : BottomSheetBehavior.BottomSheetCallback() {