diff --git a/mvvmbase/src/main/java/com/bing/mvvmbase/base/recycleview/BaseRecycleViewActivity.kt b/mvvmbase/src/main/java/com/bing/mvvmbase/base/recycleview/BaseRecycleViewActivity.kt index c37bd7c..2acf1ce 100644 --- a/mvvmbase/src/main/java/com/bing/mvvmbase/base/recycleview/BaseRecycleViewActivity.kt +++ b/mvvmbase/src/main/java/com/bing/mvvmbase/base/recycleview/BaseRecycleViewActivity.kt @@ -89,7 +89,7 @@ abstract class BaseRecycleViewActivity mAdapter.mData = data }) + data.observe(this, Observer { data -> mAdapter.data = data }) networkState.observe(this, Observer { status -> if (status == null) { return@Observer diff --git a/mvvmbase/src/main/java/com/bing/mvvmbase/base/recycleview/BaseRecycleViewAdapter.kt b/mvvmbase/src/main/java/com/bing/mvvmbase/base/recycleview/BaseRecycleViewAdapter.kt index b763e91..14afed4 100644 --- a/mvvmbase/src/main/java/com/bing/mvvmbase/base/recycleview/BaseRecycleViewAdapter.kt +++ b/mvvmbase/src/main/java/com/bing/mvvmbase/base/recycleview/BaseRecycleViewAdapter.kt @@ -13,7 +13,7 @@ import androidx.recyclerview.widget.RecyclerView abstract class BaseRecycleViewAdapter> : RecyclerView.Adapter() { var data: List? = ArrayList() - set(data_temp: List?) { + set(data_temp) { if (data_temp == null) { return } diff --git a/mvvmbase/src/main/java/com/bing/mvvmbase/base/recycleview/BaseRecycleViewFragment.kt b/mvvmbase/src/main/java/com/bing/mvvmbase/base/recycleview/BaseRecycleViewFragment.kt index 9d6ae21..6ebfda1 100644 --- a/mvvmbase/src/main/java/com/bing/mvvmbase/base/recycleview/BaseRecycleViewFragment.kt +++ b/mvvmbase/src/main/java/com/bing/mvvmbase/base/recycleview/BaseRecycleViewFragment.kt @@ -129,7 +129,7 @@ abstract class BaseRecycleViewFragment mAdapter.mData = list }) + data.observe(this, Observer { list -> mAdapter.data = list }) refreshState.observe(this, Observer { status -> if (status != Status.LOADING) { mRefreshLayout.finishRefresh(status == Status.SUCCESS)