aboutsummaryrefslogtreecommitdiff
path: root/core-ui/src/main/kotlin
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 /core-ui/src/main/kotlin
parenta99e5885a8e67c2609b3c23dff069189c2e62dab (diff)
downloadkau-d6f213563be35b183f81e20e95d925dbd65e4694.tar.gz
kau-d6f213563be35b183f81e20e95d925dbd65e4694.tar.bz2
kau-d6f213563be35b183f81e20e95d925dbd65e4694.zip
Add braces to non assignment if statements
Diffstat (limited to 'core-ui/src/main/kotlin')
-rw-r--r--core-ui/src/main/kotlin/ca/allanwang/kau/ui/activities/ElasticRecyclerActivity.kt4
-rw-r--r--core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt4
2 files changed, 6 insertions, 2 deletions
diff --git a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/activities/ElasticRecyclerActivity.kt b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/activities/ElasticRecyclerActivity.kt
index aff4d1c..3e7254f 100644
--- a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/activities/ElasticRecyclerActivity.kt
+++ b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/activities/ElasticRecyclerActivity.kt
@@ -53,7 +53,9 @@ abstract class ElasticRecyclerActivity : KauBaseActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.kau_elastic_recycler_activity)
setSupportActionBar(kau_toolbar)
- if (!onCreate(savedInstanceState, configs)) return
+ if (!onCreate(savedInstanceState, configs)) {
+ return
+ }
kau_draggable.addListener(object : ElasticDragDismissFrameLayout.SystemChromeFader(this) {
override fun onDragDismissed() {
diff --git a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt
index 52672fa..6095a32 100644
--- a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt
+++ b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt
@@ -204,7 +204,9 @@ class ElasticDragDismissFrameLayout @JvmOverloads constructor(
}
translationY = dragTo
- if (shouldScale) scaleXY = 1 - (1 - dragDismissScale) * dragFraction
+ if (shouldScale) {
+ scaleXY = 1 - (1 - dragDismissScale) * dragFraction
+ }
// if we've reversed direction and gone past the settle point then clear the flags to
// allow the list to get the scroll events & reset any transforms