aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/ca/allanwang/kau/utils/ActivityUtils.kt
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/kotlin/ca/allanwang/kau/utils/ActivityUtils.kt')
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/utils/ActivityUtils.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/ActivityUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/ActivityUtils.kt
index 5631e70..33bdc62 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/utils/ActivityUtils.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/utils/ActivityUtils.kt
@@ -32,9 +32,9 @@ fun Activity.startActivityForResult(
bundle: Bundle? = null,
intentBuilder: Intent.() -> Unit = {}) {
val intent = Intent(this, clazz)
- val fullBundle = if (transition && buildIsLollipopAndUp)
- ActivityOptions.makeSceneTransitionAnimation(this).toBundle()
- else Bundle()
+ val fullBundle = Bundle()
+ if (transition && buildIsLollipopAndUp)
+ fullBundle.with(ActivityOptions.makeSceneTransitionAnimation(this).toBundle())
if (bundle != null) fullBundle.putAll(bundle)
intent.intentBuilder()
startActivityForResult(intent, requestCode, if (fullBundle.isEmpty) null else fullBundle)