Commit 72f3351e by 刘鹏

Merge branch 'fix/lp/lp_fix_im' into 'release'

feat: 修复和自己聊天崩溃问题

See merge request app_android_lib/YDL-Component!191
parents 3fa30c0d fa9c94a9
......@@ -486,6 +486,15 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
}
@Override
public void switchPushStatus(H5JsBean.H5JsCmd.Params params) {
if (params.getSwitchStatus() == 1) {
// MsgPushLifecycle.Companion.setH5Open(true);
} else {
// MsgPushLifecycle.Companion.setH5Open(false);
}
}
@Override
public void switchSound(int mediaId, long meditationId, int meditationType, int businessType,
String buried, String mediaUrl, String mediaCoverUrl,
String title, String desc, int status) {
......
......@@ -460,6 +460,9 @@ class WebJavascriptHandler : IJavascriptHandler{
findRouteService(IConfideService::class.java).showExpertDetailDialog(topActivity, url, doctorId, uid ?: "")
}
}
"switch_push_status" -> {
wvEnventPro?.switchPushStatus(jsData.cmd?.params)
}
}
}
......
......@@ -201,4 +201,6 @@ public interface WebViewClientClickListener {
void getNextExpertStatus(String doctorID, String title, String uid, String linkUrl);
//h5页面是否需要打开推送
void switchPushStatus(H5JsBean.H5JsCmd.Params params);
}
......@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.30.09",
"m-user" : "0.0.62.55",
"m-home" : "0.0.23.95",
"m-im" : "0.0.21.62",
"m-im" : "0.0.21.63",
"m-dynamic" : "0.0.7.74",
"m-article" : "0.0.0.10",
"m-muse" : "0.0.28.81",
......@@ -96,7 +96,7 @@ ext {
"m-fm" : "0.0.30.09",
"m-user" : "0.0.62.55",
"m-home" : "0.0.23.95",
"m-im" : "0.0.21.62",
"m-im" : "0.0.21.63",
"m-dynamic" : "0.0.7.74",
"m-article" : "0.0.0.10",
......
......@@ -84,7 +84,7 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
kapt 'com.alibaba:arouter-compiler:1.2.2'
implementation 'com.ydl:nim-base:1.1.0.4'
implementation 'com.ydl:nim-base:1.1.0.7'
// implementation 'com.netease.nimlib:basesdk:8.5.0'
implementation 'com.netease.nimlib:avchat:9.1.1'
implementation 'com.netease.nimlib:nrtc:9.1.1'
......
......@@ -371,9 +371,9 @@ public class SessionHelper {
};
infoButton.iconId = R.drawable.im_more12x;
buttons.add(infoButton);
if (p2pCustomization != null){
p2pCustomization.buttons = buttons;
}
myP2pCustomization.withSticker = true;
return myP2pCustomization;
}
......
......@@ -167,7 +167,7 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
//读取未发送的临时消息
if (ActionHandlerStorage.getL(sessionId) != null) {
if (messageFragment.getInputPanel()==null||messageFragment.getInputPanel().getInputContent() == null || messageFragment.getInputPanel().getInputContent().equals("")) {
if (messageFragment.getInputPanel() == null || messageFragment.getInputPanel().getInputContent() == null || messageFragment.getInputPanel().getInputContent().equals("")) {
if (messageFragment.getInputPanel()!=null){
messageFragment.getInputPanel().setInputContent(ActionHandlerStorage.getL(sessionId).getImTempData(sessionId));
}
......@@ -300,9 +300,10 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
if (isFinishing()) {
//聊天返回时,检查是否有未发送内容,如果有则保存到ImTempData 临时map中,再次进入时读取
if (messageFragment != null) {
if (ActionHandlerStorage.getL(sessionId) != null)
if (ActionHandlerStorage.getL(sessionId) != null) {
ActionHandlerStorage.getL(sessionId).saveImTempData(sessionId, messageFragment.getInputPanel().getInputContent());
}
}
ActionHandlerStorage.recycleL(sessionId);
}
}
......
......@@ -308,7 +308,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
@SuppressLint("CheckResult")
private void initView() {
if (ChatStatusCacheHelper.getStatusCache("chatEvent")&&SessionTypeEnum.Team!=sessionType) {
if (ChatStatusCacheHelper.getStatusCache("chatEvent")&&SessionTypeEnum.Team != sessionType) {
// 获取首问语数据
ServiceImpl.Companion.getInstance().getFirstQuestion()
.subscribeOn(Schedulers.io())
......@@ -328,13 +328,11 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
boolean isExpert = null != actionHandler && actionHandler.getUserType() == 2;
//不是群聊
boolean notTeam = sessionType != SessionTypeEnum.Team;
//info信息
IP2PCustomActionHandler.DocInfo info = actionHandler.getInfo();
//不是客服
boolean notKefu = !ImConstants.KEFUXIAOYI.equals(sessionId);
if (isExpert && notTeam && info != null && notKefu && info.doctorId != null) {
String doctorId = info.doctorId;
if (isExpert && notTeam && actionHandler.getInfo() != null && notKefu && actionHandler.getInfo().doctorId != null) {
String doctorId = actionHandler.getInfo().doctorId;
ServiceImpl.Companion.getInstance().canViewConsult(doctorId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
......@@ -365,7 +363,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
} else {
titleBar.setTitleRightDraw(getResources().getDrawable(R.drawable.im_erduoxiaolv));
}
if (ActionHandlerStorage.getL(sessionId)!=null){
if (ActionHandlerStorage.getL(sessionId) != null){
titleBar.setTitle(ActionHandlerStorage.getL(sessionId).getInfo().name);
}
// 初始化顶部专家信息栏
......
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