Commit cc685a48 by 刘鹏

feat: 服务中状态

parent 19878e9e
...@@ -550,9 +550,10 @@ object IMChatUtil { ...@@ -550,9 +550,10 @@ 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.setMinTitleText("服务中")
tb.setMinTitleColor( tb.setMinTitleColor(
ContextCompat.getColor( ContextCompat.getColor(
context, context,
...@@ -562,11 +563,12 @@ object IMChatUtil { ...@@ -562,11 +563,12 @@ object IMChatUtil {
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 if (status == 3) { //忙碌 }
tb.setMinTitleText("忙碌") 2 -> { //离线
tb.setMinTitleText("离线")
tb.setMinTitleColor( tb.setMinTitleColor(
ContextCompat.getColor( ContextCompat.getColor(
context, context,
...@@ -576,10 +578,11 @@ object IMChatUtil { ...@@ -576,10 +578,11 @@ object IMChatUtil {
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 { //在线 1,3,6.. }
else -> { //在线 1
tb.setMinTitleText("在线") tb.setMinTitleText("在线")
tb.setMinTitleColor( tb.setMinTitleColor(
ContextCompat.getColor( ContextCompat.getColor(
...@@ -594,6 +597,7 @@ object IMChatUtil { ...@@ -594,6 +597,7 @@ object IMChatUtil {
) )
) )
} }
}
initSystemMessage( initSystemMessage(
chatStatusBean.data.promptRule, chatStatusBean.data.promptRule,
status, status,
......
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