From 3578806acd0650ade5b3de559ecb3fcf30a0684f Mon Sep 17 00:00:00 2001 From: farouqafghani Date: Tue, 13 Jun 2023 16:18:30 +0300 Subject: [PATCH] v2.5.6 - Fix on Pagination: starting page number = 0 --- README.md | 2 +- generalAdapter/build.gradle | 2 +- .../com/haizo/generaladapter/loadmore/BaseLoadMoreHelper.kt | 4 ++-- .../generaladapter/loadmore/legacyadapter/LoadMoreAdapter.kt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ca0c2d4..96fe02b 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ allprojects { ```gradle dependencies { - implementation 'com.github.haizo-code:recyclerview-general-adapter:v2.5.5' + implementation 'com.github.haizo-code:recyclerview-general-adapter:v2.5.6' } ``` diff --git a/generalAdapter/build.gradle b/generalAdapter/build.gradle index 7eb3aad..9d42d78 100644 --- a/generalAdapter/build.gradle +++ b/generalAdapter/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' apply plugin: 'maven-publish' -var libVersion = "2.5.5" +var libVersion = "2.5.6" android { compileSdkVersion 33 diff --git a/generalAdapter/src/main/java/com/haizo/generaladapter/loadmore/BaseLoadMoreHelper.kt b/generalAdapter/src/main/java/com/haizo/generaladapter/loadmore/BaseLoadMoreHelper.kt index f4dfd05..41d089d 100644 --- a/generalAdapter/src/main/java/com/haizo/generaladapter/loadmore/BaseLoadMoreHelper.kt +++ b/generalAdapter/src/main/java/com/haizo/generaladapter/loadmore/BaseLoadMoreHelper.kt @@ -28,7 +28,7 @@ internal abstract class BaseLoadMoreHelper { protected var loadingListItem: ListItem = MockLoadingListItem() private var mScrollListener: RecyclerView.OnScrollListener? = null var isLoadingInProgress: Boolean = false - var currentPage = 1 + var currentPage = 0 var nextPagePayload: String? = null /** @@ -79,7 +79,7 @@ internal abstract class BaseLoadMoreHelper { abstract fun removeLoadMoreIfExists(commitCallback: Runnable? = null) fun resetPage() { - currentPage = 1 + currentPage = 0 } private var lastTriggerTime: Long = 0 diff --git a/generalAdapter/src/main/java/com/haizo/generaladapter/loadmore/legacyadapter/LoadMoreAdapter.kt b/generalAdapter/src/main/java/com/haizo/generaladapter/loadmore/legacyadapter/LoadMoreAdapter.kt index 0e65fac..2dd2cb0 100644 --- a/generalAdapter/src/main/java/com/haizo/generaladapter/loadmore/legacyadapter/LoadMoreAdapter.kt +++ b/generalAdapter/src/main/java/com/haizo/generaladapter/loadmore/legacyadapter/LoadMoreAdapter.kt @@ -75,7 +75,7 @@ abstract class LoadMoreAdapter internal constructor() : RecyclerView.Adapter