diff options
author | Allan Wang <me@allanwang.ca> | 2018-01-01 23:22:51 -0500 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2018-01-01 23:22:51 -0500 |
commit | 71f5dc2f7ce5b8183421586e6a77be65040a4dff (patch) | |
tree | fedd18e271463ce2430637a9913e8470e84181ce /mediapicker/src/main/kotlin/ca | |
parent | f94d6f9694973c2a323e565794d948002593df0a (diff) | |
download | kau-71f5dc2f7ce5b8183421586e6a77be65040a4dff.tar.gz kau-71f5dc2f7ce5b8183421586e6a77be65040a4dff.tar.bz2 kau-71f5dc2f7ce5b8183421586e6a77be65040a4dff.zip |
Format everything and use reified generics
Diffstat (limited to 'mediapicker/src/main/kotlin/ca')
-rw-r--r-- | mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerBinder.kt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerBinder.kt b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerBinder.kt index bf58a30..87f5a42 100644 --- a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerBinder.kt +++ b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerBinder.kt @@ -19,9 +19,9 @@ import com.bumptech.glide.request.RequestOptions /** * Image picker launchers */ -fun Activity.kauLaunchMediaPicker(clazz: Class<out MediaPickerCore<*>>, requestCode: Int) { - startActivityForResult(clazz, requestCode, bundleBuilder = { - if (MediaPickerActivityOverlayBase::class.java.isAssignableFrom(clazz)) +inline fun <reified T : MediaPickerCore<*>> Activity.kauLaunchMediaPicker(requestCode: Int) { + startActivityForResult<T>(requestCode, bundleBuilder = { + if (MediaPickerActivityOverlayBase::class.java.isAssignableFrom(T::class.java)) withSceneTransitionAnimation(this@kauLaunchMediaPicker) }) } |