Commit cfc16170 by fengquan

feat: Code Review代码调整

parent 2e1cb369
...@@ -666,7 +666,7 @@ class ConfideHomeActivity : ...@@ -666,7 +666,7 @@ class ConfideHomeActivity :
super.onBackPressed() super.onBackPressed()
} }
public fun searchLinkUrlByUid(uid : String):String{ fun searchLinkUrlByUid(uid : String):String{
cacheList?.forEach {confideHomeDataBean -> cacheList?.forEach {confideHomeDataBean ->
confideHomeDataBean.body?.forEach { confideHomeBodyBean -> confideHomeDataBean.body?.forEach { confideHomeBodyBean ->
if (uid == confideHomeBodyBean.uid.toString()){ if (uid == confideHomeBodyBean.uid.toString()){
......
...@@ -243,7 +243,7 @@ class ConfideHomeRecommendExpertItemView(mContext: Context, private var confideH ...@@ -243,7 +243,7 @@ class ConfideHomeRecommendExpertItemView(mContext: Context, private var confideH
private fun click(bodyBean: ConfideHomeBodyBean) { private fun click(bodyBean: ConfideHomeBodyBean) {
when (bodyBean.confideLine) {//1在线 2离线 3通话中 when (bodyBean.confideLine) {//1在线 2离线 3通话中
1, 3, 4 -> { 1, 3, 4 -> {
confideHomeEvent.consultantClick(bodyBean.doctorId, bodyBean.confidedId, bodyBean.uid?.toString(),bodyBean.listenFree) confideHomeEvent.consultantClick(bodyBean.doctorId, bodyBean.confidedId, bodyBean.uid?.toString(), bodyBean.listenFree)
} }
2 -> { 2 -> {
//跳转私聊 并发送自定义消息 //跳转私聊 并发送自定义消息
......
...@@ -94,7 +94,7 @@ class ConfideHomeRecommendView(var view: IConfideHomeContract.View, context: Con ...@@ -94,7 +94,7 @@ class ConfideHomeRecommendView(var view: IConfideHomeContract.View, context: Con
"1" "1"
) )
confideHomeEvent.consultantClick(bodyBean.doctorId, bodyBean.confidedId, bodyBean.uid?.toString(),bodyBean.listenFree,bodyBean.linkUrl) confideHomeEvent.consultantClick(bodyBean.doctorId, bodyBean.confidedId, bodyBean.uid?.toString(), bodyBean.listenFree,bodyBean.linkUrl)
} }
img_head.setOnClickListener { img_head.setOnClickListener {
...@@ -345,7 +345,7 @@ class ConfideHomeRecommendView(var view: IConfideHomeContract.View, context: Con ...@@ -345,7 +345,7 @@ class ConfideHomeRecommendView(var view: IConfideHomeContract.View, context: Con
if (bodyBean.confideLine == 3) { if (bodyBean.confideLine == 3) {
} }
confideHomeEvent.consultantClick(bodyBean.doctorId, bodyBean.confidedId, bodyBean.uid?.toString(),bodyBean.listenFree) confideHomeEvent.consultantClick(bodyBean.doctorId, bodyBean.confidedId, bodyBean.uid?.toString(), bodyBean.listenFree)
} }
2 -> { 2 -> {
//跳转私聊 并发送自定义消息 //跳转私聊 并发送自定义消息
......
...@@ -430,9 +430,9 @@ internal fun VideoViewModel.mapOf(bean: ConfideHomeBodyBean): VideoViewModel { ...@@ -430,9 +430,9 @@ internal fun VideoViewModel.mapOf(bean: ConfideHomeBodyBean): VideoViewModel {
uid = bean.uid?.toString() uid = bean.uid?.toString()
doctorId = bean.doctorId doctorId = bean.doctorId
confideId = bean.confidedId confideId = bean.confidedId
if (bean.listenFree == null){ if (bean.listenFree == null) {
listenFree.set(false) listenFree.set(false)
}else{ } else {
listenFree.set(bean.listenFree!!) listenFree.set(bean.listenFree!!)
} }
return this return this
......
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