From 63b74cbc2bc9c1a50e04572b9c27c7507aa324b6 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 6 Aug 2019 20:28:07 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/widget/recycler/scroller/FastScroller.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/widget/recycler/scroller/FastScroller.kt b/app/src/main/java/io/legado/app/ui/widget/recycler/scroller/FastScroller.kt index 85a04b8b3..eee187a85 100644 --- a/app/src/main/java/io/legado/app/ui/widget/recycler/scroller/FastScroller.kt +++ b/app/src/main/java/io/legado/app/ui/widget/recycler/scroller/FastScroller.kt @@ -100,7 +100,7 @@ class FastScroller : LinearLayout { } fun setLayoutParams(viewGroup: ViewGroup) { - @IdRes val recyclerViewId = if (mRecyclerView != null) mRecyclerView!!.id else View.NO_ID + @IdRes val recyclerViewId = mRecyclerView?.id ?: View.NO_ID val marginTop = resources.getDimensionPixelSize(R.dimen.fastscroll_scrollbar_margin_top) val marginBottom = resources.getDimensionPixelSize(R.dimen.fastscroll_scrollbar_margin_bottom) if (recyclerViewId == View.NO_ID) {