From d6f213563be35b183f81e20e95d925dbd65e4694 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 27 Jul 2019 20:14:05 -0700 Subject: Add braces to non assignment if statements --- .../kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt | 5 +++-- .../src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'mediapicker/src') diff --git a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt index c7cff55..ad83d8a 100644 --- a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt +++ b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt @@ -110,11 +110,12 @@ abstract class MediaPickerActivityBase( */ private fun setToolbarScrollable(scrollable: Boolean) { val params = kau_toolbar.layoutParams as AppBarLayout.LayoutParams - if (scrollable) + if (scrollable) { params.scrollFlags = AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS or AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL - else + } else { params.scrollFlags = 0 + } } override fun onLoadFinished(loader: Loader, data: Cursor?) { diff --git a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt index d21b33f..cc6df81 100644 --- a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt +++ b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt @@ -147,9 +147,8 @@ abstract class MediaPickerCore( recycler.apply { val manager = object : GridLayoutManager(context, computeColumnCount(context)) { override fun getExtraLayoutSpace(state: RecyclerView.State?): Int { - return if (mediaType != MediaType.VIDEO) extraSpace else super.getExtraLayoutSpace( - state - ) + return if (mediaType != MediaType.VIDEO) extraSpace + else super.getExtraLayoutSpace(state) } } setItemViewCacheSize(CACHE_SIZE) -- cgit v1.2.3