|
|
@@ -6,6 +6,10 @@ import android.widget.TextView;
|
|
|
import com.tencent.qcloud.tuikit.timcommon.bean.TUIMessageBean;
|
|
|
import com.tencent.qcloud.tuikit.timcommon.classicui.widget.message.MessageContentHolder;
|
|
|
import com.tencent.qcloud.tuikit.tuichat.R;
|
|
|
+import com.tencent.qcloud.tuikit.tuichat.bean.CustomEndConsultationBean;
|
|
|
+import com.tencent.qcloud.tuikit.tuichat.bean.CustomPatientInfoBean;
|
|
|
+import com.tencent.qcloud.tuikit.tuichat.bean.EndConsultationBean;
|
|
|
+import com.tencent.qcloud.tuikit.tuichat.bean.message.ChatIdBean;
|
|
|
import com.yingyangfly.baselib.dialog.EvaluateDialog;
|
|
|
import com.yingyangfly.baselib.utils.RxBusCodes;
|
|
|
|
|
|
@@ -17,6 +21,7 @@ import gorden.rxbus2.RxBus;
|
|
|
public class EndConsultationMessageHolder extends MessageContentHolder {
|
|
|
|
|
|
private TextView tvEvaluate;
|
|
|
+ private String chatId = "";
|
|
|
|
|
|
public EndConsultationMessageHolder(View itemView) {
|
|
|
super(itemView);
|
|
|
@@ -30,6 +35,13 @@ public class EndConsultationMessageHolder extends MessageContentHolder {
|
|
|
|
|
|
@Override
|
|
|
public void layoutVariableViews(TUIMessageBean msg, int position) {
|
|
|
+ if (msg instanceof CustomEndConsultationBean) {
|
|
|
+ CustomEndConsultationBean bean = (CustomEndConsultationBean) msg;
|
|
|
+ ChatIdBean chatIdBean = bean.getChatIdBean();
|
|
|
+ if (chatIdBean != null) {
|
|
|
+ chatId = chatIdBean.getChatId();
|
|
|
+ }
|
|
|
+ }
|
|
|
tvEvaluate.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
@@ -37,7 +49,7 @@ public class EndConsultationMessageHolder extends MessageContentHolder {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
RxBus.get().register(this);
|
|
|
- RxBus.get().send(RxBusCodes.EVALUATE_ORDER);
|
|
|
+ RxBus.get().send(RxBusCodes.EVALUATE_ORDER, chatId);
|
|
|
RxBus.get().unRegister(this);
|
|
|
}
|
|
|
});
|