aboutsummaryrefslogtreecommitdiff
path: root/mediapicker/src/main
diff options
context:
space:
mode:
authorAllan Wang <allanwang@google.com>2019-07-27 20:14:05 -0700
committerAllan Wang <allanwang@google.com>2019-07-27 20:14:05 -0700
commitd6f213563be35b183f81e20e95d925dbd65e4694 (patch)
tree7fd886e82f5e4797727e75858e7ca66d8ad181d4 /mediapicker/src/main
parenta99e5885a8e67c2609b3c23dff069189c2e62dab (diff)
downloadkau-d6f213563be35b183f81e20e95d925dbd65e4694.tar.gz
kau-d6f213563be35b183f81e20e95d925dbd65e4694.tar.bz2
kau-d6f213563be35b183f81e20e95d925dbd65e4694.zip
Add braces to non assignment if statements
Diffstat (limited to 'mediapicker/src/main')
-rw-r--r--mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt5
-rw-r--r--mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerCore.kt5
2 files changed, 5 insertions, 5 deletions
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<Cursor>, 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<T : GenericItem>(
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)