Commit cc685a48 by 刘鹏

feat: 服务中状态

parent 19878e9e
...@@ -550,49 +550,53 @@ object IMChatUtil { ...@@ -550,49 +550,53 @@ object IMChatUtil {
val status = chatStatusBean.data.status val status = chatStatusBean.data.status
actionHandler.setDoctorStatus(status) actionHandler.setDoctorStatus(status)
actionHandler.setDoctorBusyNum(chatStatusBean.data.busyTotal) actionHandler.setDoctorBusyNum(chatStatusBean.data.busyTotal)
//1.在线,2.离线,3.忙碌 4咨询中, 5倾述中 6咨询前准备 //1.在线,2.离线,3.服务中 4咨询中, 5倾述中 6咨询前准备
if (status == 2) { //离线 when (status) {
tb.setMinTitleText("离线") 3 -> { //服务中
tb.setMinTitleColor( tb.setMinTitleText("服务中")
ContextCompat.getColor( tb.setMinTitleColor(
context, ContextCompat.getColor(
R.color.platform_color_666666 context,
R.color.platform_color_666666
)
) )
) tb.setMinTitleDrawable(
tb.setMinTitleDrawable( ContextCompat.getDrawable(
ContextCompat.getDrawable( context,
context, R.drawable.im_background_chat_top_status_online_server
R.drawable.im_background_chat_top_status_off_line )
) )
) }
} else if (status == 3) { //忙碌 2 -> { //离线
tb.setMinTitleText("忙碌") tb.setMinTitleText("离线")
tb.setMinTitleColor( tb.setMinTitleColor(
ContextCompat.getColor( ContextCompat.getColor(
context, context,
R.color.platform_color_666666 R.color.platform_color_666666
)
) )
) tb.setMinTitleDrawable(
tb.setMinTitleDrawable( ContextCompat.getDrawable(
ContextCompat.getDrawable( context,
context, R.drawable.im_background_chat_top_status_off_line
R.drawable.im_background_chat_top_status_online_server )
) )
) }
} else { //在线 1,3,6.. else -> { //在线 1
tb.setMinTitleText("在线") tb.setMinTitleText("在线")
tb.setMinTitleColor( tb.setMinTitleColor(
ContextCompat.getColor( ContextCompat.getColor(
context, context,
R.color.platform_color_666666 R.color.platform_color_666666
)
) )
) tb.setMinTitleDrawable(
tb.setMinTitleDrawable( ContextCompat.getDrawable(
ContextCompat.getDrawable( context,
context, R.drawable.im_background_chat_top_status_online
R.drawable.im_background_chat_top_status_online )
) )
) }
} }
initSystemMessage( initSystemMessage(
chatStatusBean.data.promptRule, chatStatusBean.data.promptRule,
......
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