Commit d0a6dbe6 by 刘鹏

fix : 修复云信消息不更新bug

parent 4c642e23
......@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04",
"m-home" : "0.0.23.48",
"m-im" : "0.0.21.35",
"m-im" : "0.0.21.42",
"m-dynamic" : "0.0.7.72",
"m-article" : "0.0.0.10",
......@@ -96,7 +96,7 @@ ext {
"m-fm" : "0.0.30.08",
"m-user" : "0.0.62.04",
"m-home" : "0.0.23.48",
"m-im" : "0.0.21.35",
"m-im" : "0.0.21.42",
"m-dynamic" : "0.0.7.72",
"m-article" : "0.0.0.8",
......
......@@ -84,10 +84,10 @@ 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.3'
implementation 'com.ydl:nim-base:1.1.0.4'
// implementation 'com.netease.nimlib:basesdk:8.5.0'
implementation 'com.netease.nimlib:avchat:8.7.2'
implementation 'com.netease.nimlib:nrtc:8.7.2'
implementation 'com.netease.nimlib:avchat:9.1.1'
implementation 'com.netease.nimlib:nrtc:9.1.1'
api rootProject.ext.dependencies["ydl-user-router"]
implementation rootProject.ext.dependencies["BaseRecyclerViewAdapterHelper"]
......
......@@ -2,6 +2,7 @@ package com.yidianling.im.config.provider
import android.content.Context
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum
import com.netease.nimlib.sdk.msg.model.IMMessage
import com.netease.nimlib.sdk.uinfo.model.UserInfo
import com.ydl.ydlcommon.utils.UserInfoCache
import com.yidianling.uikit.api.wrapper.NimUserInfoProvider
......@@ -31,4 +32,8 @@ class CustomUserInfoProvider(context:Context) : NimUserInfoProvider(context) {
override fun getDisplayNameForMessageNotifier(account: String?, sessionId: String?, sessionType: SessionTypeEnum?): String {
return UserInfoCache.getInstance().getUser(account).nickName
}
override fun getDisplayTitleForMessageNotifier(p0: IMMessage?): String {
return ""
}
}
......@@ -17,11 +17,9 @@ import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity;
import com.ydl.ydlcommon.data.http.RxUtils;
import com.yidianling.common.tools.LogUtil;
import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R;
import com.yidianling.im.config.constants.ImConstants;
import com.yidianling.im.helper.IMChatUtil;
import com.yidianling.im.http.ImRetrofitApi;
import com.yidianling.im.session.extension.CustomAttachmentConfirmOrder;
import com.yidianling.im.session.extension.CustomAttachmentOrderAlreadyDone;
......@@ -51,7 +49,6 @@ public class MsgViewHolderOrderAlreadyDone extends MsgViewHolderBase {
public String orderId;
/***0 未确认 1已确认*/
public int flag;
public boolean isSureed = false;//是否已确认
public MsgViewHolderOrderAlreadyDone(BaseMultiItemFetchLoadAdapter adapter) {
......@@ -129,8 +126,14 @@ public class MsgViewHolderOrderAlreadyDone extends MsgViewHolderBase {
.subscribe(it -> {
//确认完成,按钮置灰,更新本地消息
updateLocalMsg();
}, throwable ->
ToastUtil.toastShort(throwable.getMessage())
}, throwable ->{
if(throwable.getMessage().contains("非已服务待确认")){
updateLocalMsg();
onItemClick();
}else {
ToastUtil.toastShort(throwable.getMessage());
}
}
);
});
......@@ -152,19 +155,18 @@ public class MsgViewHolderOrderAlreadyDone extends MsgViewHolderBase {
updateSureView("已确认");
}
} else {
isSureed = false;
tv_submit.setText("确认");
tv_submit.setEnabled(true);
tv_submit.setBackground(ContextCompat.getDrawable(context, R.drawable.bg_radius_green_linear_12));
}
} else {
isSureed = false;
tv_submit.setText("确认");
tv_submit.setEnabled(true);
tv_submit.setBackground(ContextCompat.getDrawable(context, R.drawable.bg_radius_green_linear_12));
}
} catch (Exception e) {
e.printStackTrace();
}
hideItemBg();
......
......@@ -7,6 +7,7 @@ import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.netease.nimlib.sdk.team.model.Team;
import com.netease.nimlib.sdk.uinfo.UserInfoProvider;
import com.netease.nimlib.sdk.uinfo.model.UserInfo;
......@@ -62,6 +63,11 @@ public class NimUserInfoProvider implements UserInfoProvider {
}
@Override
public String getDisplayTitleForMessageNotifier(IMMessage imMessage) {
return null;
}
@Override
public String getDisplayNameForMessageNotifier(String account, String sessionId, SessionTypeEnum sessionType) {
String nick = null;
if (sessionType == SessionTypeEnum.P2P) {
......
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