Commit b4a89612 by 霍志良

fix:修复redPoint接口,body

parent 482512f5
......@@ -97,12 +97,11 @@ import com.yidianling.im.session.viewholder.MsgViewHolderSticker;
import com.yidianling.im.session.viewholder.MsgViewHolderSubscriptTime;
import com.yidianling.im.session.viewholder.MsgViewHolderSystemTips;
import com.yidianling.im.session.viewholder.MsgViewHolderTip;
import com.yidianling.im.ui.param.BuryRedPointsParm;
import com.yidianling.im.ui.param.BuryRedPointParam;
import com.yidianling.nimbase.api.model.session.SessionCustomization;
import com.yidianling.nimbase.api.model.session.SessionEventListener;
import com.yidianling.nimbase.business.session.actions.BaseAction;
import com.yidianling.nimbase.impl.cache.TeamDataCache;
import com.yidianling.user.api.bean.UserResponseBean;
import com.yidianling.uikit.api.NimUIKit;
import com.yidianling.uikit.business.session.actions.ImageAction;
import com.yidianling.uikit.business.session.actions.VideoAction;
......@@ -111,7 +110,7 @@ import com.yidianling.uikit.business.team.model.TeamExtras;
import com.yidianling.uikit.business.team.model.TeamRequestCode;
import com.yidianling.uikit.custom.bridge.ActionHandlerStorage;
import com.yidianling.uikit.custom.bridge.IP2PCustomActionHandler;
import com.yidianling.user.api.bean.UserResponseBean;
import java.util.ArrayList;
......@@ -212,7 +211,7 @@ public class SessionHelper {
* 通知服务端红点
* */
private static void notifyRedPoint( String assistantUid, String userId) {
String str = new Gson().toJson(new BuryRedPointsParm(assistantUid, userId));
String str = new Gson().toJson(new BuryRedPointParam(assistantUid, userId));
RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), str);
Disposable subscribe = ImRetrofitApi.Companion.getImRetrofitApi().imBuryRedPoints(body)
.compose(RxUtils.INSTANCE.resultJavaData())
......
package com.yidianling.im.ui.param;
/**
* @author huozhiliang
* @描述:
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2020/9/10
*/
public class BuryRedPointParam {
public String assistantUid;
public String userUid;
public BuryRedPointParam(String assistantUid, String userId) {
this.assistantUid = assistantUid;
this.userUid = userId;
}
}
package com.yidianling.im.ui.param
/**
* @author huozhiliang
* @描述:
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2020/9/8
*/
class BuryRedPointsParm (assistantUid :String,userId:String)
\ No newline at end of file
......@@ -255,21 +255,21 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
fl_question_content = rootView.findViewById(R.id.fl_question_content);
rl_common_question_enter.setVisibility(ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getUserType() == 3 ? View.VISIBLE : View.GONE);
if(ActionHandlerStorage.getL(sessionId).getUserType()!=2) {
if (ActionHandlerStorage.getL(sessionId).getUserType() != 2) {
if (null != getActivity() && null != rela_zixun) {
rela_zixun.setVisibility(View.GONE);
}
}
if(ActionHandlerStorage.getL(sessionId).isNotPrepare()) {
IMChatUtil.INSTANCE.prepareChatData((AppCompatActivity) getActivity(),sessionId, (expertInfo) -> {
if (ActionHandlerStorage.getL(sessionId).isNotPrepare()) {
IMChatUtil.INSTANCE.prepareChatData((AppCompatActivity) getActivity(), sessionId, (expertInfo) -> {
String toUid = expertInfo.shareData.toUid;
IP2PCustomActionHandler handler = ActionHandlerStorage.getL(sessionId);
handler.setExpertInfo(toUid,expertInfo);
handler.setExpertInfo(toUid, expertInfo);
handler.setUserType(expertInfo.shareData.user_type);
initView();
});
}else {
} else {
initView();
}
}
......@@ -357,7 +357,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
initTopViewHeight(); //设置顶部专家信息栏高度
addScrollListener();
TitleBarBottom titleBar = ((YDLBaseMessageActivity) getActivity()).getTitleBarBottom();
IMChatUtil.INSTANCE.initChatOnlineState(titleBar,getContext(),sessionId,this);
IMChatUtil.INSTANCE.initChatOnlineState(titleBar, getContext(), sessionId, this);
}
if (ActionHandlerStorage.getL(sessionId) != null) {
......@@ -480,19 +480,23 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
try {
String year = bean.getContent();
userInfoDialogAge = Calendar.getInstance().get(Calendar.YEAR) - Integer.valueOf(year);
} catch (Exception e) { }
} catch (Exception e) {
}
} else if (TextUtils.equals(bean.getUserInfoType(), "gener")) {
try {
userInfoDialogSex = bean.getContent();
} catch (Exception e) { }
}else if (TextUtils.equals(bean.getUserInfoType(), "questionType")) {
} catch (Exception e) {
}
} else if (TextUtils.equals(bean.getUserInfoType(), "questionType")) {
try {
userInfoDialogConsultType = bean.getContent();
} catch (Exception e) { }
}else if (TextUtils.equals(bean.getUserInfoType(), "questionContent")) {
} catch (Exception e) {
}
} else if (TextUtils.equals(bean.getUserInfoType(), "questionContent")) {
try {
userInfoDialogQuestionDes = bean.getContent();
} catch (Exception e) { }
} catch (Exception e) {
}
}
}
getSourceFrom();
......@@ -582,11 +586,11 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
rl_contain.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
if(initHeightFinish) {
rvPaddingTop+=rl_contain.getHeight();
messageListView.setPadding(0,rvPaddingTop,0,0);
}else {
rvPaddingTop+=rl_contain.getHeight();
if (initHeightFinish) {
rvPaddingTop += rl_contain.getHeight();
messageListView.setPadding(0, rvPaddingTop, 0, 0);
} else {
rvPaddingTop += rl_contain.getHeight();
}
initHeightFinish = true;
rl_contain.getViewTreeObserver().removeOnGlobalLayoutListener(this);
......@@ -596,19 +600,19 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
@Override
public void onGlobalLayout() {
expertInfoViewHeight = top_expert_info_ll.getHeight();
if(messageListPanel.linearLayoutManager.findLastVisibleItemPosition()==0) {
if (messageListPanel.linearLayoutManager.findLastVisibleItemPosition() == 0) {
initHeightFinish = true;
//如果页面未充满时,设置padding会出现覆盖问题,必须设置margin才可以
messageListView.setPadding(0,rvPaddingTop,0,0);
messageListView.setPadding(0, rvPaddingTop, 0, 0);
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) messageListView.getLayoutParams();
layoutParams.topMargin = expertInfoViewHeight;
messageListView.setLayoutParams(layoutParams);
} else {
if(initHeightFinish) {
rvPaddingTop+=expertInfoViewHeight;
messageListView.setPadding(0,rvPaddingTop,0,0);
}else {
rvPaddingTop+=expertInfoViewHeight;
if (initHeightFinish) {
rvPaddingTop += expertInfoViewHeight;
messageListView.setPadding(0, rvPaddingTop, 0, 0);
} else {
rvPaddingTop += expertInfoViewHeight;
}
}
initHeightFinish = true;
......@@ -622,7 +626,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
@Override
public void onGlobalLayout() {
int rvPaddingTop = ll_actions_yi.getHeight();
messageListView.setPadding(0,rvPaddingTop,0,0);
messageListView.setPadding(0, rvPaddingTop, 0, 0);
rl_contain.getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
});
......
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