aboutsummaryrefslogtreecommitdiff
path: root/adapter
diff options
context:
space:
mode:
Diffstat (limited to 'adapter')
-rw-r--r--adapter/build.gradle2
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/adapters/AdapterUtils.kt5
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/adapters/RepeatedClickListener.kt2
3 files changed, 4 insertions, 5 deletions
diff --git a/adapter/build.gradle b/adapter/build.gradle
index b58c912..a4f2583 100644
--- a/adapter/build.gradle
+++ b/adapter/build.gradle
@@ -5,9 +5,7 @@ apply from: '../android-lib.gradle'
dependencies {
implementation project(':core')
- //noinspection GradleDependency
api "com.mikepenz:fastadapter-commons:${kau.fastAdapterCommons}@aar"
- //noinspection GradleDependency
api "com.mikepenz:fastadapter:${kau.fastAdapter}@aar"
}
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++