Commit 13d2b66c by 严久程

im 私聊问题修复,flutter升级

parent d5f38fd5
ext {
kotlin_version = "1.3.21"
dev_mode = true
dev_mode = false
ydl_app = [
appName : "心理咨询壹点灵",
......@@ -47,7 +47,7 @@ ext {
"m-fm" : "0.0.28",
"m-user" : "0.0.58.2",
"m-home" : "0.0.19.1",
"m-im" : "0.0.14.4",
"m-im" : "0.0.15.2",
"m-dynamic" : "0.0.6.1",
"m-muse" : "0.0.27",
......@@ -76,7 +76,7 @@ ext {
"ydl-media" : "0.0.20",
"ydl-pay" : "0.0.17",
"m-audioim" : "0.0.46.5",
"ydl-flutter-base": "0.0.10",
"ydl-flutter-base": "0.0.10.4",
//以下 几乎不会动
"router" : "0.0.1",
......@@ -270,7 +270,7 @@ ext {
//flutter功能组件升级===>发布ydl-flutter组件===>引用flutter相关的业务模块
"ydl-flutter-base" : "com.ydl:ydl-flutter-base:${ydlCompileVersion["ydl-flutter-base"]}", //组件化项目中的flutter base模块
"ydl-flutter" : "com.ydl:ydl-flutter:0.0.16.9@aar", //flutter aar
"ydl-flutter" : "com.ydl:ydl-flutter:0.0.17.0@aar", //flutter aar
"ydl-flutter-sp" : "com.ydl:ydl-flutter-sp:0.0.2@aar", //flutter 缓存 aar
//基础组件 <<--- 先发这个,发完改这里的版本号
......
......@@ -86,9 +86,6 @@ public class IMUtil {
GetExpert cmd = new GetExpert(Integer.parseInt(toUid), canTalk);
if (isFromMessageList) {
//先根据uid判断用户类型:专家调一个接口,非专家调另外的接口
ImRetrofitApi.Companion.getImJavaApi().getUserType(toUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
......@@ -101,13 +98,11 @@ public class IMUtil {
ChatStatusCacheHelper.setStatusCache("collectEvent", res.data.getCollectEvent());
}
if (TextUtils.equals(res.data.getUserType(), "2")) {//专家 java 接口
//如果是从消息列表点击进来的,那么专家还是专家,助理还是助理,不走其他所有逻辑(比如销售代运营)
if (TextUtils.equals(res.data.getUserType(), "2")) {//专家
if (isFromMessageList) {
startExpertChat(context, toUid, dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
return;
}
//在uid用户类型确定为专家的情况下,根据uid调用接口判断是进入专家私聊还是助理私聊
ImRetrofitApi.Companion.getImJavaApi().getChatUid((toUid))
.subscribeOn(Schedulers.io())
......@@ -115,42 +110,6 @@ public class IMUtil {
.subscribe(resp -> {
DoctorAssistantRespDtoBean bean = resp.data;
if (bean.getRole() == 1) {
//接口返回值是专家,java接口
startExpertChat(context, bean.getChatUid(), dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
} else {
GetExpert cmd1 = new GetExpert(Integer.parseInt(bean.getChatUid()), canTalk);
//接口返回值是助理,php接口
startAssistantChat(context, bean.getChatUid(), cmd1, dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
}
}, t -> {
HttpErrorUtils.Companion.handleError(context, t);
});
} else {//非专家 php接口
startAssistantChat(context, toUid, cmd, dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
}
} else {
if (dialog.isVisible()) {
dialog.dismissAllowingStateLoss();
}
ToastUtil.toastShort(res.msg);
}
}, throwable -> {
if (dialog.isVisible()) {
dialog.dismissAllowingStateLoss();
}
HttpErrorUtils.Companion.handleError(context, throwable);
});
} else {
ImRetrofitApi.Companion.getImJavaApi().getChatUid(toUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(getChatUidResp -> {
DoctorAssistantRespDtoBean bean = getChatUidResp.data;
ImRetrofitApi.Companion.getImJavaApi().getUserType(bean.chatUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
......@@ -187,64 +146,24 @@ public class IMUtil {
});
}, t -> {
HttpErrorUtils.Companion.handleError(context, t);
});
} else {
startAssistantChat(context, toUid, cmd, dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
}
} else {
if (dialog.isVisible()) {
dialog.dismissAllowingStateLoss();
}
HttpErrorUtils.Companion.handleError(context, t);
});
ToastUtil.toastShort(res.msg);
}
// //先根据uid判断用户类型:专家调一个接口,非专家调另外的接口
// Disposable disposable = ImRetrofitApi.Companion.getImJavaApi().getUserType(toUid)
// .subscribeOn(Schedulers.io())
// .observeOn(AndroidSchedulers.mainThread())
// .subscribe(res -> {
// if (res.code == 200) {
// if (TextUtils.equals(res.data, "2")) {//专家 java 接口
//
// //如果是从消息列表点击进来的,那么专家还是专家,助理还是助理,不走其他所有逻辑(比如销售代运营)
// if (isFromMessageList) {
// startExpertChat(context, toUid, dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
// return ;
// }
//
// //在uid用户类型确定为专家的情况下,根据uid调用接口判断是进入专家私聊还是助理私聊
// Disposable disposa = ImRetrofitApi.Companion.getImJavaApi().getChatUid((toUid))
// .subscribeOn(Schedulers.io())
// .observeOn(AndroidSchedulers.mainThread())
// .subscribe(resp -> {
//
// DoctorAssistantRespDtoBean bean = resp.data;
// if (bean.getRole() == 1) {
// //接口返回值是专家,java接口
// startExpertChat(context, bean.getChatUid(), dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
// }else {
//
// GetExpert cmd1 = new GetExpert(Integer.parseInt(bean.getChatUid()), canTalk);
// //接口返回值是助理,php接口
// startAssistantChat(context, bean.getChatUid(), cmd1, dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
// }
//
// },t->{
// HttpErrorUtils.Companion.handleError(context, t);
// });
// } else {//非专家 php接口
// startAssistantChat(context, toUid, cmd, dialog, listener, isUseUm, isSaveUserInfo, isFromQingShu);
// }
// } else {
// if (dialog.isVisible()) {
// dialog.dismissAllowingStateLoss();
// }
// ToastUtil.toastShort(res.msg);
// }
// }, throwable -> {
// if (dialog.isVisible()) {
// dialog.dismissAllowingStateLoss();
// }
// HttpErrorUtils.Companion.handleError(context, throwable);
// });
}, throwable -> {
if (dialog.isVisible()) {
dialog.dismissAllowingStateLoss();
}
HttpErrorUtils.Companion.handleError(context, throwable);
});
}
/**
......
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