aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/adapters/RepeatedClickListener.kt3
-rw-r--r--sample/src/main/res/xml/kau_changelog.xml1
2 files changed, 2 insertions, 2 deletions
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 d864a55..5925454 100644
--- a/adapter/src/main/kotlin/ca/allanwang/kau/adapters/RepeatedClickListener.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/adapters/RepeatedClickListener.kt
@@ -40,11 +40,10 @@ private class RepeatedClickListener<Item : IItem<*, *>>(
if (time - now < duration)
chain++
else
- chain = 0
+ chain = 1
time = now
if (chain == count) {
chain = 0
- time = -1
event.onClick(v, adapter, item, position)
return true
}
diff --git a/sample/src/main/res/xml/kau_changelog.xml b/sample/src/main/res/xml/kau_changelog.xml
index 55e110d..6356ef4 100644
--- a/sample/src/main/res/xml/kau_changelog.xml
+++ b/sample/src/main/res/xml/kau_changelog.xml
@@ -7,6 +7,7 @@
-->
<version title="v3.6.0" />
+ <item text=":adapter: Create withOnRepeatedClickListener" />
<item text=":core: Create kotlin flyweight" />
<item text=":core: Created BundleUtils" />
<item text=":core: [Breaking] Refactored startActivity functions" />