diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/source/SourceController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/source/SourceController.kt index f92ab3fbdd..dd038fe2ef 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/source/SourceController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/source/SourceController.kt @@ -131,7 +131,8 @@ class SourceController : NucleusController(), ext_bottom_sheet.sheetBehavior?.addBottomSheetCallback(object : BottomSheetBehavior .BottomSheetCallback() { override fun onSlide(bottomSheet: View, progress: Float) { - shadow2?.alpha = (1 - max(0f, progress)) * 0.25f + val recycler = recycler ?: return + shadow2.alpha = (1 - max(0f, progress)) * 0.25f activity?.appbar?.elevation = max(progress * 15f, if (recycler.canScrollVertically(-1)) 15f else 0f) @@ -146,6 +147,7 @@ class SourceController : NucleusController(), } override fun onStateChanged(p0: View, state: Int) { + val ext_bottom_sheet = ext_bottom_sheet ?: return if (state == BottomSheetBehavior.STATE_EXPANDED) activity?.appbar?.y = 0f if (state == BottomSheetBehavior.STATE_EXPANDED || state == BottomSheetBehavior.STATE_COLLAPSED) {