diff --git a/mvp/src/main/java/com/catchpig/mvp/base/adapter/RecyclerAdapter.kt b/mvp/src/main/java/com/catchpig/mvp/base/adapter/RecyclerAdapter.kt index 7d5ca06..474c012 100644 --- a/mvp/src/main/java/com/catchpig/mvp/base/adapter/RecyclerAdapter.kt +++ b/mvp/src/main/java/com/catchpig/mvp/base/adapter/RecyclerAdapter.kt @@ -148,7 +148,6 @@ abstract class RecyclerAdapter: RecyclerView.Adapter,IAdapt override fun autoUpdateList(list: MutableList?) { pageControl?.let { - it.updateSuccess(list) when (it.getRefreshStatus()) { RefreshState.Refreshing -> { set(list) @@ -157,6 +156,7 @@ abstract class RecyclerAdapter: RecyclerView.Adapter,IAdapt add(list) } } + it.updateSuccess(list) } } diff --git a/mvp/src/main/java/com/catchpig/mvp/widget/refresh/IPageControl.kt b/mvp/src/main/java/com/catchpig/mvp/widget/refresh/IPageControl.kt index df8abce..d6d7c6c 100644 --- a/mvp/src/main/java/com/catchpig/mvp/widget/refresh/IPageControl.kt +++ b/mvp/src/main/java/com/catchpig/mvp/widget/refresh/IPageControl.kt @@ -10,7 +10,7 @@ import com.scwang.smart.refresh.layout.constant.RefreshState * 描述: 页码关联 */ interface IPageControl { - + var pageSize:Int var nextPageIndex:Int fun getRefreshStatus():RefreshState diff --git a/mvp/src/main/java/com/catchpig/mvp/widget/refresh/RefreshLayoutWrapper.kt b/mvp/src/main/java/com/catchpig/mvp/widget/refresh/RefreshLayoutWrapper.kt index 8186b6a..11462b5 100644 --- a/mvp/src/main/java/com/catchpig/mvp/widget/refresh/RefreshLayoutWrapper.kt +++ b/mvp/src/main/java/com/catchpig/mvp/widget/refresh/RefreshLayoutWrapper.kt @@ -47,20 +47,11 @@ class RefreshLayoutWrapper( /** * 一页的条目,默认16 */ - private var pageSize = 16 + override var pageSize = 16 override fun getRefreshStatus(): RefreshState { return state } - /** - * 设置单页加载数据数 - * - * @param pageSize 单页数据项 - */ - fun setPageSize(pageSize: Int) { - this.pageSize = pageSize - } - /** * 列表更新成功 *