Merge branch 'refs/heads/新潘多拉' into 新潘多拉_6.8.2

# Conflicts:
#	live/src/main/res/layout/dialog_live_data.xml
#	live/src/main/res/values-zh/strings.xml
This commit is contained in:
Martin 2024-08-21 13:58:23 +08:00
commit 67b79cd306
20 changed files with 131 additions and 34 deletions

View File

@ -29,6 +29,7 @@ import com.facebook.appevents.AppEventsLogger;
import com.fm.openinstall.OpenInstall; import com.fm.openinstall.OpenInstall;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.pandoralive.shayu.R; import com.pandoralive.shayu.R;
import com.yunbao.common.utils.DebugUtils;
import com.yunbao.common.utils.LogUtils; import com.yunbao.common.utils.LogUtils;
import com.tencent.imsdk.v2.V2TIMGroupMemberInfo; import com.tencent.imsdk.v2.V2TIMGroupMemberInfo;
import com.yunbao.common.http.Data; import com.yunbao.common.http.Data;
@ -482,7 +483,7 @@ public class AppContext extends CommonAppContext {
NeverCrashUtils.getInstance().setDebugMode(BuildConfig.DEBUG).setMainCrashHandler((t, e) -> { NeverCrashUtils.getInstance().setDebugMode(BuildConfig.DEBUG).setMainCrashHandler((t, e) -> {
Log.e("ApplicationError", "主线程异常");//此处log只是展示当debug为true时主类内部log会打印异常信息 Log.e("ApplicationError", "主线程异常");//此处log只是展示当debug为true时主类内部log会打印异常信息
e.printStackTrace(); e.printStackTrace();
AppManager.runDebugCode(() -> { DebugUtils.runDebugCode(() -> {
//闪退后finish所有Activity并且杀死进程 //闪退后finish所有Activity并且杀死进程
for (WeakReference<Activity> activity : activities) { for (WeakReference<Activity> activity : activities) {
if (activity != null && activity.get() != null) { if (activity != null && activity.get() != null) {

View File

@ -10,6 +10,7 @@ import android.widget.Toast;
import com.yunbao.common.bean.CrashSaveBean; import com.yunbao.common.bean.CrashSaveBean;
import com.yunbao.common.utils.AppManager; import com.yunbao.common.utils.AppManager;
import com.yunbao.common.utils.DebugUtils;
import com.yunbao.common.utils.FileUtil; import com.yunbao.common.utils.FileUtil;
import com.yunbao.common.utils.SpUtil; import com.yunbao.common.utils.SpUtil;
@ -105,10 +106,10 @@ public class NeverCrashUtils {
} }
e.printStackTrace(); e.printStackTrace();
AppContext.setFirebaseCrashData(); AppContext.setFirebaseCrashData();
AppManager.runDebugCode(() -> Toast.makeText(application, "发生闪退:" + e.getMessage(), Toast.LENGTH_SHORT).show()); DebugUtils.runDebugCode(() -> Toast.makeText(application, "发生闪退:" + e.getMessage(), Toast.LENGTH_SHORT).show());
FileUtil.saveStringToFile(new File(application.getDir("files", Context.MODE_PRIVATE).getAbsolutePath()), throwableToString(e), "error.log"); FileUtil.saveStringToFile(new File(application.getDir("files", Context.MODE_PRIVATE).getAbsolutePath()), throwableToString(e), "error.log");
getMainCrashHandler().mainException(Looper.getMainLooper().getThread(), e); getMainCrashHandler().mainException(Looper.getMainLooper().getThread(), e);
AppManager.runDebugCode(() -> errorWhile = false); DebugUtils.runDebugCode(() -> errorWhile = false);
// return; // return;
} }
} }

View File

@ -13,6 +13,7 @@ import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import com.blankj.utilcode.util.LogUtils;
import com.yunbao.common.R; import com.yunbao.common.R;
import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.interfaces.OnRecyclerListRefreshListener; import com.yunbao.common.interfaces.OnRecyclerListRefreshListener;
@ -187,8 +188,11 @@ public class MainConversationListAdapter extends ConversationListAdapter {
} }
} }
private int listHashCode = 0;
@Override @Override
public void setDataCollection(List<BaseUiConversation> data) { public synchronized void setDataCollection(List<BaseUiConversation> data) {
if (data.hashCode() == listHashCode) return;
listHashCode = data.hashCode();
List<BaseUiConversation> tmp = new ArrayList<>(); List<BaseUiConversation> tmp = new ArrayList<>();
Log.i("聊天数据源", "setDataCollection: " + data.hashCode()); Log.i("聊天数据源", "setDataCollection: " + data.hashCode());
List<String> urls = new ArrayList<>(); List<String> urls = new ArrayList<>();
@ -219,8 +223,11 @@ public class MainConversationListAdapter extends ConversationListAdapter {
} }
urls.add(item.mCore.getTargetId()); urls.add(item.mCore.getTargetId());
Log.i("聊天数据源", item.mCore.getConversationTitle() + "|" + item.mCore.getPortraitUrl() + "|" + item.mCore.getTargetId()); Log.i("聊天数据源", item.mCore.getConversationTitle() + "|" + item.mCore.getPortraitUrl() + "|" + item.mCore.getTargetId());
if (!tmpUids.contains(item.mCore.getTargetId())) {
BaseUiConversation cn = new SingleConversation(mContext, item.mCore); BaseUiConversation cn = new SingleConversation(mContext, item.mCore);
srcList.add(cn); srcList.add(cn);
tmpUids.add(item.mCore.getTargetId());
}
if (item.mCore.getConversationType() == Conversation.ConversationType.PRIVATE) { if (item.mCore.getConversationType() == Conversation.ConversationType.PRIVATE) {
if (item.mCore.getLatestMessage() instanceof MessageChatCardContent) { if (item.mCore.getLatestMessage() instanceof MessageChatCardContent) {
@ -233,6 +240,8 @@ public class MainConversationListAdapter extends ConversationListAdapter {
super.setDataCollection(tmp); super.setDataCollection(tmp);
} }
private List<String> tmpUids = new ArrayList<>();
public void clear() { public void clear() {
mDataList.clear(); mDataList.clear();
if (srcList != null) { if (srcList != null) {

View File

@ -143,7 +143,7 @@ public abstract class AbsMainMessageChatListFragment extends Fragment {
isNet = true; isNet = true;
for (BaseUiConversation conversation : srcList) { for (BaseUiConversation conversation : srcList) {
map.put(conversation.mCore.getTargetId(), conversation); map.put(conversation.mCore.getTargetId(), conversation);
if (conversation.mCore.getConversationType() == Conversation.ConversationType.PRIVATE) { if (conversation.mCore.getConversationType() == Conversation.ConversationType.PRIVATE&& !conversation.mCore.getTargetId().equals("__system__")) {
uids.add(conversation.mCore.getTargetId()); uids.add(conversation.mCore.getTargetId());
} }
} }

View File

@ -543,6 +543,13 @@ public class LiveHttpUtil {
HttpClient.getInstance().get("Live.getGiftListApp", LiveHttpConsts.GET_GIFT_LIST) HttpClient.getInstance().get("Live.getGiftListApp", LiveHttpConsts.GET_GIFT_LIST)
.execute(callback); .execute(callback);
} }
/**
* 获取礼物列表同时会返回剩余的钱新版 -用于获取联系方式时的礼物设置
*/
public static void getHotGiftList(HttpCallback callback) {
HttpClient.getInstance().get("Gift.getHotGiftList", LiveHttpConsts.GET_GIFT_LIST)
.execute(callback);
}
/** /**
* 获取包裹列表 * 获取包裹列表

View File

@ -123,6 +123,7 @@ public class InstructorRemarkManager extends BaseCacheManager {
@Override @Override
public void run() { public void run() {
IMLoginModel userInfo = IMLoginManager.get(context).getUserInfo(); IMLoginModel userInfo = IMLoginManager.get(context).getUserInfo();
if(userInfo==null)return;
HttpClient.getInstance().get("User.getInstructorRemark", "getInstructorRemark") HttpClient.getInstance().get("User.getInstructorRemark", "getInstructorRemark")
.params("uid", userInfo.getId(), true) .params("uid", userInfo.getId(), true)
.params("token", userInfo.getToken(), true) .params("token", userInfo.getToken(), true)

View File

@ -0,0 +1,19 @@
package com.yunbao.common.manager.imrongcloud;
import java.lang.reflect.Method;
import io.rong.imkit.userinfo.RongUserInfoManager;
import io.rong.imlib.model.UserInfo;
public class PDRongUserInfoManager {
public static void saveUserInfo(UserInfo userInfo) {
RongUserInfoManager instance = RongUserInfoManager.getInstance();
try {
Method method = instance.getClass().getDeclaredMethod("saveUserInfoCache", userInfo.getClass());
method.setAccessible(true);
method.invoke(instance, userInfo);
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@ -179,14 +179,6 @@ public class AppManager {
activityStack.clear(); activityStack.clear();
} }
/**
* 仅在debug下运行的代码
*/
public static void runDebugCode(Runnable runnable) {
if (BuildConfig.DEBUG) {
runnable.run();
}
}
/** /**

View File

@ -0,0 +1,30 @@
package com.yunbao.common.utils;
import android.util.Log;
import com.yunbao.common.BuildConfig;
public class DebugUtils {
/**
* 打印堆栈信息
*/
public static void showStackTrace(){
StackTraceElement[] stackTrace = new Throwable().getStackTrace();
StringBuilder sb=new StringBuilder();
for (StackTraceElement element : stackTrace) {
if(element!=null){
sb.append(element).append("\n");
}
}
Log.e("DebugUtils",sb.toString());
}
/**
* 仅在debug下运行的代码
*/
public static void runDebugCode(Runnable runnable) {
if (BuildConfig.DEBUG) {
runnable.run();
}
}
}

View File

@ -4,7 +4,7 @@ ext {
buildToolsVersion: "29.0.2", buildToolsVersion: "29.0.2",
minSdkVersion : 23, minSdkVersion : 23,
targetSdkVersion : 34, targetSdkVersion : 34,
versionCode : 546, versionCode : 550,
versionName : "6.8.0", versionName : "6.8.0",
namespace : "com.pandoralive.shayu" namespace : "com.pandoralive.shayu"
] ]

View File

@ -176,6 +176,7 @@ public class LiveAnchorEditCallMeAdapter extends RecyclerView.Adapter<LiveAnchor
public void onDismiss() { public void onDismiss() {
} }
}) })
.setHotGiftListUrl(true)
.setShowNumber(false) .setShowNumber(false)
.setTitle(mContext.getString(R.string.live_anchor_edit_call_me_select_gift)) .setTitle(mContext.getString(R.string.live_anchor_edit_call_me_select_gift))
.setHideGiftType(true) .setHideGiftType(true)

View File

@ -62,7 +62,12 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene
private TextView mTitle; private TextView mTitle;
private boolean isOldGiftList = false; private boolean isOldGiftList = false;
private boolean hideGiftType = false; private boolean hideGiftType = false;
private boolean isHotGiftListUrl = false;
public GiftPopDialog setHotGiftListUrl(boolean hotGiftListUrl) {
isHotGiftListUrl = hotGiftListUrl;
return this;
}
public GiftPopDialog(@NonNull Context context) { public GiftPopDialog(@NonNull Context context) {
super(context); super(context);
@ -183,6 +188,25 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene
} }
} }
@Override
public void onFinish() {
if (mLoading != null) {
mLoading.setVisibility(View.INVISIBLE);
}
}
});
} else if (isHotGiftListUrl) {
LiveHttpUtil.getHotGiftList(new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0 && info.length > 0) {
JSONObject obj = JSON.parseObject(info[0]);
JSONArray list = obj.getJSONArray("listarray");
setDate(list);
}
}
@Override @Override
public void onFinish() { public void onFinish() {
if (mLoading != null) { if (mLoading != null) {

View File

@ -62,6 +62,7 @@ import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.AppManager; import com.yunbao.common.utils.AppManager;
import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.DebugUtils;
import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.GiftCacheUtil; import com.yunbao.common.utils.GiftCacheUtil;
@ -1092,7 +1093,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
Bus.get().post(event); Bus.get().post(event);
}).build().show(); }).build().show();
AppManager.runDebugCode(() -> { DebugUtils.runDebugCode(() -> {
Log.i("gifBean", mLiveGiftBean.toString()); Log.i("gifBean", mLiveGiftBean.toString());
}); });
} else if (code == 1001) { } else if (code == 1001) {

View File

@ -44,6 +44,7 @@ import com.opensource.svgaplayer.SVGADrawable;
import com.opensource.svgaplayer.SVGAImageView; import com.opensource.svgaplayer.SVGAImageView;
import com.opensource.svgaplayer.SVGAParser; import com.opensource.svgaplayer.SVGAParser;
import com.opensource.svgaplayer.SVGAVideoEntity; import com.opensource.svgaplayer.SVGAVideoEntity;
import com.yunbao.common.utils.DebugUtils;
import com.yunbao.common.utils.L; import com.yunbao.common.utils.L;
import com.yunbao.common.utils.MobclickAgent; import com.yunbao.common.utils.MobclickAgent;
import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppConfig;
@ -1432,7 +1433,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
Bus.get().post(event); Bus.get().post(event);
}).build().show(); }).build().show();
AppManager.runDebugCode(() -> { DebugUtils.runDebugCode(() -> {
Log.i("gifBean", mGiftBean.toString()); Log.i("gifBean", mGiftBean.toString());
}); });
} else if (code == 1001) { } else if (code == 1001) {

View File

@ -71,6 +71,7 @@ import com.opensource.svgaplayer.SVGAParser;
import com.opensource.svgaplayer.SVGAVideoEntity; import com.opensource.svgaplayer.SVGAVideoEntity;
import com.yunbao.common.bean.PrankProgressBean; import com.yunbao.common.bean.PrankProgressBean;
import com.yunbao.common.fragment.GiftWallMainTab1Fragment; import com.yunbao.common.fragment.GiftWallMainTab1Fragment;
import com.yunbao.common.utils.DebugUtils;
import com.yunbao.common.utils.L; import com.yunbao.common.utils.L;
import com.yunbao.common.utils.MobclickAgent; import com.yunbao.common.utils.MobclickAgent;
import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppConfig;
@ -2362,7 +2363,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
if (!IMLoginManager.get(mContext).hintChat()) { if (!IMLoginManager.get(mContext).hintChat()) {
msgLayout.setVisibility(View.VISIBLE); msgLayout.setVisibility(View.VISIBLE);
} }
AppManager.runDebugCode(() -> msgLayout.setVisibility(View.GONE)); DebugUtils.runDebugCode(() -> msgLayout.setVisibility(View.GONE));
if (d_pk_view != null) { if (d_pk_view != null) {
d_pk_view.setVisibility(View.GONE); d_pk_view.setVisibility(View.GONE);
} }

View File

@ -33,6 +33,7 @@ import com.lzf.easyfloat.permission.PermissionUtils;
import com.lzf.easyfloat.utils.LifecycleUtils; import com.lzf.easyfloat.utils.LifecycleUtils;
import com.yunbao.common.event.LiveMsgWindowsCloseEvent; import com.yunbao.common.event.LiveMsgWindowsCloseEvent;
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager; import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
import com.yunbao.common.utils.DebugUtils;
import com.yunbao.common.utils.MobclickAgent; import com.yunbao.common.utils.MobclickAgent;
import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext; import com.yunbao.common.CommonAppContext;
@ -287,7 +288,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
liveImDeletUtil = new LiveImDeletUtil(); liveImDeletUtil = new LiveImDeletUtil();
portraitLiveManager = this; portraitLiveManager = this;
ininView(); ininView();
AppManager.runDebugCode(() -> waitShowTopBannerTime = 1000); DebugUtils.runDebugCode(() -> waitShowTopBannerTime = 1000);
} }
/** /**
@ -875,7 +876,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
} }
} }
//liveHandler.postDelayed(loadTimeoutRunnableGone, 15_000); //liveHandler.postDelayed(loadTimeoutRunnableGone, 15_000);
AppManager.runDebugCode(() -> { DebugUtils.runDebugCode(() -> {
liveHandler.postDelayed(loadTimeoutRunnableGone, 1_000); liveHandler.postDelayed(loadTimeoutRunnableGone, 1_000);
}); });
liveHandler.postDelayed(loadTimeoutRunnableGone, 4_000); liveHandler.postDelayed(loadTimeoutRunnableGone, 4_000);

View File

@ -15,6 +15,7 @@ import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.AppManager; import com.yunbao.common.utils.AppManager;
import com.yunbao.common.utils.DebugUtils;
import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.WordUtil;
@ -94,7 +95,7 @@ public class MainMsgAddressBookListAdapter extends BaseAdapter<MessageChatUserBe
} }
holder.getConvertView().setTag(mDataList.get(position)); holder.getConvertView().setTag(mDataList.get(position));
holder.getConvertView().setOnClickListener(view -> { holder.getConvertView().setOnClickListener(view -> {
AppManager.runDebugCode(new Runnable() { DebugUtils.runDebugCode(new Runnable() {
@Override @Override
public void run() { public void run() {
MessageChatUserBean userBean = (MessageChatUserBean) view.getTag(); MessageChatUserBean userBean = (MessageChatUserBean) view.getTag();

View File

@ -22,6 +22,7 @@ import android.widget.LinearLayout;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.yunbao.common.utils.DebugUtils;
import com.yunbao.common.utils.MobclickAgent; import com.yunbao.common.utils.MobclickAgent;
import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext; import com.yunbao.common.CommonAppContext;
@ -317,7 +318,7 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O
if (isWifiProxy(mContext) || checkVPN((ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE))) { if (isWifiProxy(mContext) || checkVPN((ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE))) {
ToastUtil.show(WordUtil.isNewZh()?"檢測開啓了VPN或者代理請先關閉VPN或者代理再開播。": ToastUtil.show(WordUtil.isNewZh()?"檢測開啓了VPN或者代理請先關閉VPN或者代理再開播。":
"It is detected that VPN or proxy is turned on. Please turn off VPN or proxy before starting the broadcast."); "It is detected that VPN or proxy is turned on. Please turn off VPN or proxy before starting the broadcast.");
AppManager.runDebugCode(() -> mCallback.onLiveClick()); DebugUtils.runDebugCode(() -> mCallback.onLiveClick());
} else { } else {
if (mCallback != null) { if (mCallback != null) {
MobclickAgent.onEvent(mContext, "home_page_broadcast", "点击开播按钮"); MobclickAgent.onEvent(mContext, "home_page_broadcast", "点击开播按钮");

View File

@ -18,6 +18,7 @@ import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.interfaces.OnRecyclerListRefreshListener; import com.yunbao.common.interfaces.OnRecyclerListRefreshListener;
import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.manager.InstructorRemarkManager; import com.yunbao.common.manager.InstructorRemarkManager;
import com.yunbao.common.manager.imrongcloud.PDRongUserInfoManager;
import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.WordUtil;
@ -233,6 +234,7 @@ public class MainMessageChatListSystemFragment extends AbsMainMessageChatListFra
@Override @Override
public void onSuccess(List<MessageChatUserBean> data) { public void onSuccess(List<MessageChatUserBean> data) {
List<BaseUiConversation> list = new ArrayList<>(); List<BaseUiConversation> list = new ArrayList<>();
UserInfo userInfo=null;
for (MessageChatUserBean datum : data) { for (MessageChatUserBean datum : data) {
Conversation conversation = new Conversation(); Conversation conversation = new Conversation();
BaseUiConversation baseUiConversation = new SingleConversation(getContext(), conversation); BaseUiConversation baseUiConversation = new SingleConversation(getContext(), conversation);
@ -247,10 +249,11 @@ public class MainMessageChatListSystemFragment extends AbsMainMessageChatListFra
list.add(baseUiConversation); list.add(baseUiConversation);
UserInfo userInfo = new UserInfo(baseUiConversation.mCore.getTargetId(), userInfo = new UserInfo(baseUiConversation.mCore.getTargetId(),
baseUiConversation.mCore.getConversationTitle(), baseUiConversation.mCore.getConversationTitle(),
Uri.parse(baseUiConversation.mCore.getPortraitUrl())); Uri.parse(baseUiConversation.mCore.getPortraitUrl()));
RongUserInfoManager.getInstance().refreshUserInfoCache(userInfo); // RongUserInfoManager.getInstance().refreshUserInfoCache(userInfo);
PDRongUserInfoManager.saveUserInfo(userInfo);
} }
if (!list.isEmpty()) { if (!list.isEmpty()) {
List<BaseUiConversation> srcList = new ArrayList<>(mAdapter.getSrcList()); List<BaseUiConversation> srcList = new ArrayList<>(mAdapter.getSrcList());

View File

@ -50,6 +50,7 @@ import com.opensource.svgaplayer.SVGAParser;
import com.opensource.svgaplayer.SVGAVideoEntity; import com.opensource.svgaplayer.SVGAVideoEntity;
import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.fragment.MainMessageRecommendFragment; import com.yunbao.common.fragment.MainMessageRecommendFragment;
import com.yunbao.common.utils.DebugUtils;
import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.MobclickAgent; import com.yunbao.common.utils.MobclickAgent;
@ -339,7 +340,9 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
@Override @Override
public void onPageSelected(int position) { public void onPageSelected(int position) {
super.onPageSelected(position); super.onPageSelected(position);
if(!StringUtil.isEmpty(search.getText().toString())) {
search.setText(""); search.setText("");
}
selectTab(position); selectTab(position);
} }
}); });
@ -508,7 +511,7 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
LiveNetManager.get(mContext).getIsAnchor(new com.yunbao.common.http.base.HttpCallback<MessageChatIsAnchor>() { LiveNetManager.get(mContext).getIsAnchor(new com.yunbao.common.http.base.HttpCallback<MessageChatIsAnchor>() {
@Override @Override
public void onSuccess(MessageChatIsAnchor data) { public void onSuccess(MessageChatIsAnchor data) {
AppManager.runDebugCode(() -> { DebugUtils.runDebugCode(() -> {
more.setVisibility(View.VISIBLE); more.setVisibility(View.VISIBLE);
}); });
if (data.getIsAnchor() == 1 && CommonAppConfig.getInstance().getUserBean().getUsers_type().equals("C")) { if (data.getIsAnchor() == 1 && CommonAppConfig.getInstance().getUserBean().getUsers_type().equals("C")) {