diff options
Diffstat (limited to 'adapter/src/main/kotlin')
-rw-r--r-- | adapter/src/main/kotlin/ca/allanwang/kau/adapters/AdapterUtils.kt | 5 | ||||
-rw-r--r-- | adapter/src/main/kotlin/ca/allanwang/kau/adapters/RepeatedClickListener.kt | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/adapter/src/main/kotlin/ca/allanwang/kau/adapters/AdapterUtils.kt b/adapter/src/main/kotlin/ca/allanwang/kau/adapters/AdapterUtils.kt index 14be76b..2f25d8c 100644 --- a/adapter/src/main/kotlin/ca/allanwang/kau/adapters/AdapterUtils.kt +++ b/adapter/src/main/kotlin/ca/allanwang/kau/adapters/AdapterUtils.kt @@ -1,5 +1,6 @@ package ca.allanwang.kau.adapters +import android.view.View import com.mikepenz.fastadapter.FastAdapter import com.mikepenz.fastadapter.IAdapter import com.mikepenz.fastadapter.IItem @@ -11,5 +12,5 @@ import com.mikepenz.fastadapter.IItem /** * Add kotlin's generic syntax to better support out types */ -fun <T : IItem<*, *>> fastAdapter(vararg adapter: IAdapter<out T>) = - FastAdapter.with<T, IAdapter<out T>>(adapter.toList())!!
\ No newline at end of file +fun <Item : IItem<*, *>> fastAdapter(vararg adapter: IAdapter<out Item>) = + FastAdapter.with<Item, IAdapter<out Item>>(adapter.toList())!!
\ No newline at end of file diff --git a/adapter/src/main/kotlin/ca/allanwang/kau/adapters/RepeatedClickListener.kt b/adapter/src/main/kotlin/ca/allanwang/kau/adapters/RepeatedClickListener.kt index 5925454..aeee94c 100644 --- a/adapter/src/main/kotlin/ca/allanwang/kau/adapters/RepeatedClickListener.kt +++ b/adapter/src/main/kotlin/ca/allanwang/kau/adapters/RepeatedClickListener.kt @@ -35,7 +35,7 @@ private class RepeatedClickListener<Item : IItem<*, *>>( private var chain = 0 private var time = -1L - override fun onClick(v: View, adapter: IAdapter<Item>, item: Item, position: Int): Boolean { + override fun onClick(v: View?, adapter: IAdapter<Item>, item: Item, position: Int): Boolean { val now = System.currentTimeMillis() if (time - now < duration) chain++ |