Commit 9014f2e8 by 刘鹏

Merge branch 'fix/lp/fix_consultant_refresh' into 'release'

feat: 咨询列表刷新问题完善

See merge request app_android_lib/YDL-Component!156
parents 26ebd735 872abb4b
......@@ -6,7 +6,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.50.21",
"m-consultant" : "0.0.60.64",
"m-consultant" : "0.0.60.66",
"m-fm" : "0.0.30.09",
"m-user" : "0.0.62.48",
"m-home" : "0.0.23.90",
......@@ -94,7 +94,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.50.21",
"m-consultant" : "0.0.60.64",
"m-consultant" : "0.0.60.66",
"m-fm" : "0.0.30.09",
"m-user" : "0.0.62.48",
"m-home" : "0.0.23.90",
......
......@@ -42,6 +42,7 @@ import com.yidianling.common.tools.ToastUtil
import com.yidianling.consultant.adapter.ExpertSearchAdapter
import com.yidianling.consultant.constants.ConsultBIConstants
import com.yidianling.consultant.listener.OnCategoriesSelectedListener
import com.yidianling.consultant.listener.OnExpertClickListener
import com.yidianling.consultant.listener.OnFilterConfirmListener
import com.yidianling.consultant.listener.OnSortItemSelectedListener
import com.yidianling.consultant.model.bean.*
......@@ -142,6 +143,8 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
const val FROM_FIND_EXPERT = 1
const val FROM_ONLINE_EXPERT = 2
const val PAGE_SIZE = 15
//列表点击回来不刷新列表
var needRefresh = true;
}
private val allFilter = AllFilter() //当前筛选
......@@ -192,7 +195,12 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
srlContainer.isEnabled = i >= 0
})
doctorAdapter = ExpertSearchAdapter(mContext, this, doctorList)
doctorAdapter = ExpertSearchAdapter(mContext, this, doctorList,object :OnExpertClickListener{
override fun onExpertClick() {
needRefresh = false
}
})
rvExperts.adapter = doctorAdapter
val layoutManager = LinearLayoutManager(
......@@ -1420,7 +1428,12 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
override fun onResume() {
super.onResume()
refresh(false)
if (needRefresh){
refresh(false)
}else{
//
needRefresh = true
}
ActionCountUtils.count(ConsultBIConstants.ConsultEvent.APP_CONSULT_LIST_PAGE_VISIT)
ActionCountUtils.count("daoyi_advertisement_page|daoyi_advertisement_visit", "6")
}
......
......@@ -26,6 +26,7 @@ import com.ydl.ydlcommon.utils.remind.ToastHelper
import com.yidianling.consultant.IExpertSearchView
import com.yidianling.consultant.R
import com.yidianling.consultant.constants.ConsultBIConstants
import com.yidianling.consultant.listener.OnExpertClickListener
import com.yidianling.consultant.model.bean.ExpertServiceItem
import com.yidianling.consultant.modular.utils.TempH5RouteUtils
import com.yidianling.consultant.router.ConsultantIn
......@@ -46,7 +47,8 @@ import java.math.BigDecimal
class ExpertSearchAdapter(
private val context: Context,
private val expertSearchView: IExpertSearchView,
private val listData: ArrayList<ExpertServiceItem>
private val listData: ArrayList<ExpertServiceItem>,
private val onExpertClick: OnExpertClickListener? = null
) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
companion object {
......@@ -547,6 +549,7 @@ class ExpertSearchAdapter(
if (!TextUtils.isEmpty(cateId)) {
linkUrl = URLUtils.appendParmas(linkUrl, "cateId", cateId)
}
onExpertClick?.onExpertClick()
TempH5RouteUtils.tempH5Route(linkUrl)
// 埋点
......
package com.yidianling.consultant.listener
/**
* 倾诉列表点击事件
* */
interface OnExpertClickListener {
/**
* 用户解决咨询列表点击后返回会刷新列表数据问题
* */
fun onExpertClick()
}
\ No newline at end of file
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