aboutsummaryrefslogtreecommitdiff
path: root/mediapicker/src/main/kotlin/ca
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-01-01 23:22:51 -0500
committerAllan Wang <me@allanwang.ca>2018-01-01 23:22:51 -0500
commit71f5dc2f7ce5b8183421586e6a77be65040a4dff (patch)
treefedd18e271463ce2430637a9913e8470e84181ce /mediapicker/src/main/kotlin/ca
parentf94d6f9694973c2a323e565794d948002593df0a (diff)
downloadkau-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.kt6
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)
})
}