Commit 438c6e44 by 刘鹏

Merge remote-tracking branch 'origin/new_dev_4.3.91' into new_dev_4.3.91

parents 06af52c8 33d33360
......@@ -5,7 +5,7 @@ ext {
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.49.70",
"m-confide" : "0.0.49.72",
"m-consultant" : "0.0.60.21",
"m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04",
......@@ -91,7 +91,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.49.70",
"m-confide" : "0.0.49.72",
"m-consultant" : "0.0.60.21",
"m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04",
......
package com.ydl.confide.home
import android.annotation.SuppressLint
import android.content.Context
import android.os.Build
import android.view.View
......@@ -331,7 +332,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
//数据重组
ConfideHomeUtils.resetData(cacheList!!, v_filterView, listScrollListener!!)
setHideFilterView()
mConfideAdapter?.updataItems(cacheList!!)
mConfideAdapter?.updateItems(cacheList!!)
mConfideAdapter?.notifyDataSetChanged()
rv_list.refreshComplete()
}
......@@ -340,7 +341,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
* 更新适配器数据(用于播放 暂停 状态切换 更新整体数据)
*/
private fun updateAdapterForPlayStatus() {
mConfideAdapter!!.updataItems(cacheList!!)
mConfideAdapter!!.updateItems(cacheList!!)
mConfideAdapter!!.notifyDataSetChanged()
}
......@@ -425,6 +426,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
*/
override fun recommendListMoreResponse(bean: ConfideHomeDataBean) {
dismissProgressDialog()
rv_list.loadMoreComplete()
bean.recommendId = page
if(bean.body?.size?:0==0) {
rv_list.loadMoreComplete()
......@@ -432,14 +434,8 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
return
}
(cacheList as ArrayList).add(bean)
var size = mConfideAdapter!!.itemCount
val size = mConfideAdapter!!.itemCount
mConfideAdapter!!.addItems(ConfideHomeUtils.getRecommendList(bean))
// if (bean?.body == null || bean.body!!.size < 10) {
// rv_list.setNoMore(true)
// } else {
rv_list.loadMoreComplete()
// }
mConfideAdapter!!.notifyItemInserted(if (size > 0) size + 1 else 0)
}
......@@ -448,13 +444,14 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
*/
override fun recommendListResponse(bean: ConfideHomeDataBean) {
dismissProgressDialog()
rv_list.loadMoreComplete()
updateCacheDataByRecommend(bean)
mConfideAdapter!!.updataItems(cacheList!!)
if (bean?.body == null || bean.body!!.size < 10) {
rv_list.setNoMore(true)
} else {
rv_list.loadMoreComplete()
}
mConfideAdapter!!.updateItems(cacheList!!)
// if (bean.body == null || bean.body.size < 10) {
// rv_list.setNoMore(true)
// } else {
// rv_list.loadMoreComplete()
// }
mConfideAdapter!!.notifyDataSetChanged()
}
......@@ -532,6 +529,7 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
}
}
@SuppressLint("MissingSuperCall")
override fun onDestroy() {
super.onDestroy()
mConfideEvent!!.destoryPlayer()
......
......@@ -43,7 +43,7 @@ class ConfideHomeAdapter(private val mContext: Context,
return mListData!![position].type!!
}
fun updataItems(list: List<ConfideHomeDataBean>) {
fun updateItems(list: List<ConfideHomeDataBean>) {
if (null == mListData || mListData!!.isEmpty()) {
mListData = ArrayList()
} else {
......
倾诉首页界面
\ No newline at end of file
......@@ -118,7 +118,7 @@ class ConfideHomeUtils {
*/
fun getRecommendList(dataBean: ConfideHomeDataBean): MutableList<ConfideHomeDataBean> {
var list: MutableList<ConfideHomeDataBean> = ArrayList()
if (null == dataBean || null == dataBean.body || dataBean.body.isEmpty()) {
if (dataBean.body == null || dataBean.body.isEmpty()) {
return list
}
for (bodyBean in dataBean.body) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment