Commit 6584422c by konghaorui

修复私聊右上角更多按钮点击无效问题、小壹对话布局问题

parent 4e762f14
......@@ -8,9 +8,9 @@ ext {
"m-confide" : "0.0.48.23",
"m-consultant" : "0.0.59.10",
"m-fm" : "0.0.29.9",
"m-user" : "0.0.60.7",
"m-user" : "0.0.60.8",
"m-home" : "0.0.22.3",
"m-im" : "0.0.18.3",
"m-im" : "0.0.18.4",
"m-dynamic" : "0.0.7.7",
"m-article" : "0.0.0.5",
......
......@@ -96,6 +96,10 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
public P2PCustomActionHandlerImpl(String toChatUsername,
IMExpertBuild expert) {
setExpertInfo(toChatUsername,expert);
}
public void setExpertInfo(String toChatUsername,IMExpertBuild expert) {
blackStatus = Integer.valueOf(expert.shareData.blackStatus);
this.toChatUsername = toChatUsername;
......
......@@ -54,7 +54,6 @@ import com.ydl.ydlcommon.view.CircleImageView;
import com.ydl.ydlcommon.view.dialog.CommonDialog;
import com.yidianling.common.tools.ToastUtil;
import com.yidianling.im.R;
import com.yidianling.im.bridge.P2PCustomActionHandlerImpl;
import com.yidianling.im.helper.IMChatUtil;
import com.yidianling.im.router.ImIn;
import com.yidianling.nimbase.api.UIKitOptions;
......@@ -265,9 +264,9 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
if(ActionHandlerStorage.getL(sessionId).isNotPrepare()) {
IMChatUtil.INSTANCE.prepareChatData((AppCompatActivity) getActivity(),sessionId, (expertInfo) -> {
String toUid = expertInfo.shareData.toUid;
P2PCustomActionHandlerImpl handler = new P2PCustomActionHandlerImpl(toUid, expertInfo);
IP2PCustomActionHandler handler = ActionHandlerStorage.getL(sessionId);
handler.setExpertInfo(toUid,expertInfo);
handler.setUserType(expertInfo.shareData.user_type);
ActionHandlerStorage.setL(toUid, handler);
initView();
});
}else {
......@@ -616,7 +615,17 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
top_expert_info_ll.getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
});
}
private void initYiViewTopHeight() {
ll_actions_yi.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
int rvPaddingTop = ll_actions_yi.getHeight();
messageListView.setPadding(0,rvPaddingTop,0,0);
rl_contain.getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
});
}
private void initAnimation() {
......@@ -943,6 +952,8 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
}
private void initYiMenu() {
initYiViewTopHeight();
rootView.findViewById(R.id.action_help).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
......
......@@ -4,6 +4,7 @@ import android.app.Activity;
import android.content.Context;
import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.yidianling.im.api.bean.IMExpertBuild;
import com.yidianling.im.api.bean.ImCommendDetailBean;
import com.yidianling.uikit.custom.http.response.RecommendExpertBean;
......@@ -119,6 +120,7 @@ public interface IP2PCustomActionHandler {
void popCallDialog(Context context);
void setExpertInfo(String toChatUsername, IMExpertBuild expert) ;
class DocInfo {
public String toUid;
public String doctorId;
......
......@@ -2,6 +2,7 @@ package com.yidianling.user.mine;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.CardView;
......@@ -43,6 +44,7 @@ import com.yidianling.user.safePrivate.PrivacyActivity;
import com.yidianling.user.ui.login.RegisterAndLoginActivity;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.text.SimpleDateFormat;
import java.util.Date;
......@@ -98,9 +100,15 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
}
@Override
public void initDataAndEvent() {
EventBus.getDefault().register(this);
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public void initDataAndEvent() {
if (!EventBus.getDefault().isRegistered(this)) {
EventBus.getDefault().register(this);
}
swipeRefreshLayout = getRootView().findViewById(R.id.swipe_refresh_layout);
swipeRefreshLayout.setColorSchemeColors(ContextCompat.getColor(getContext(), R.color.platform_main_theme));
swipeRefreshLayout.setProgressViewOffset(false, 0, 200);
......
......@@ -40,7 +40,6 @@ class AnimUtils {
})
}
fun slideToDown(view: View?) {
val animation = TranslateAnimation(
Animation.RELATIVE_TO_SELF, 0F, Animation.RELATIVE_TO_SELF, 0f,
......
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