修改测试问题

This commit is contained in:
18401019693 2022-10-18 13:11:14 +08:00
parent 0d12df93ab
commit 91743ecd3d
6 changed files with 38 additions and 35 deletions

View File

@ -138,4 +138,21 @@ public class StarChallengeStatusModel extends BaseModel {
this.assistSrc = assistSrc;
return this;
}
@Override
public String toString() {
return "StarChallengeStatusModel{" +
"taskNum='" + taskNum + '\'' +
", currentStarVal='" + currentStarVal + '\'' +
", targetStarVal='" + targetStarVal + '\'' +
", currentAssistNum='" + currentAssistNum + '\'' +
", targetAssistNum='" + targetAssistNum + '\'' +
", starSrc='" + starSrc + '\'' +
", assistSrc='" + assistSrc + '\'' +
", taskName1='" + taskName1 + '\'' +
", taskName2='" + taskName2 + '\'' +
", activityUrl='" + activityUrl + '\'' +
", type='" + type + '\'' +
'}';
}
}

View File

@ -215,7 +215,8 @@ public class SocketRyChatUtil {
}
});
SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + "");
if (SocketRyClient.mSocketHandler != null)
SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + "");
}
@Override

View File

@ -239,9 +239,6 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
v_msg_redpoint = (View) findViewById(R.id.v_msg_redpoint);
//获取系统未读消息
MessageIMManager.get(mContext).getSystemMessages();
//底部改造
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.total_image), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
@ -452,8 +449,6 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
*/
@SuppressLint("SetTextI18n")
private Bitmap canvasBitmap(int icon, String name, String text) {
// Log.e("SVGADynamicEntity", "子布局宽度:" + name);
// Log.e("SVGADynamicEntity", "fu布局宽度" + text);
//计算设备分辨率
WindowManager manager = ((Activity) mContext).getWindowManager();
DisplayMetrics metrics = new DisplayMetrics();
@ -477,8 +472,6 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
view.measure(measureWidth, measureHeight);
//调用layout方法布局后可以得到view的尺寸
view.layout(0, 0, view.getMeasuredWidth(), view.getMeasuredHeight());
// Log.e("SVGADynamicEntity", "子布局宽度:" + childrenView.getWidth());
// Log.e("SVGADynamicEntity", "fu布局宽度" + (width / 3 * 2 - 30));
Bitmap bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.ARGB_8888);
Canvas bitmapCanvas = new Canvas(bitmap);
bitmapCanvas.drawColor(Color.TRANSPARENT);

View File

@ -42,7 +42,6 @@ import com.adjust.sdk.AdjustEvent;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.blankj.utilcode.util.GsonUtils;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.engine.GlideException;
@ -76,6 +75,7 @@ import com.yunbao.common.http.API;
import com.yunbao.common.http.CommonHttpConsts;
import com.yunbao.common.http.CommonHttpUtil;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.interfaces.CommonCallback;
import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.common.manager.IMLoginManager;
@ -1021,18 +1021,28 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
// fastMsgRecyclerView.setItemAnimator(new DefaultItemAnimator());
//主播页面隐藏头部
if (mContext instanceof LiveRyAnchorActivity) {
// findViewById(R.id.hour_rank_layout).setVisibility(View.GONE);
// findViewById(R.id.live_wks_layout).setVisibility(View.GONE);
// findViewById(R.id.wish_list_layout).setVisibility(View.GONE);
// findViewById(R.id.hour_rank_layout).setEnabled(false);
/* findViewById(R.id.live_wks_layout).setEnabled(false);
findViewById(R.id.wish_list_layout).setEnabled(false);*/
findViewById(R.id.open_sidebar).setVisibility(View.GONE);
findViewById(R.id.btn_follow).setVisibility(View.GONE);
} else {
configBanner3();
}
reloadIM();
/**
* 获取当前直播间星级
*/
LiveNetManager.get(mContext)
.getStarChallengeStatus(mLiveUid, new com.yunbao.common.http.base.HttpCallback<StarChallengeStatusModel>() {
@Override
public void onSuccess(StarChallengeStatusModel data1) {
showStart(data1);
Log.e("PortraitLiveManager", data1.toString());
}
@Override
public void onError(String error) {
Log.e("PortraitLiveManager", error);
}
});
}
public void showStart(StarChallengeStatusModel data) {

View File

@ -212,7 +212,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
}
@Override
public void onAdd(LiveBean data, int liveType, int liveTypeVal, int liveSdk) {
public synchronized void onAdd(LiveBean data, int liveType, int liveTypeVal, int liveSdk) {
openParametersModel = new OpenParametersModel();
mContext.runOnUiThread(new Runnable() {
@Override
@ -286,24 +286,6 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLiveRoomViewHolder.initHourRankList();
}
});
/**
* 获取当前直播间星级
*/
LiveNetManager.get(mContext)
.getStarChallengeStatus(mLiveBean.getUid(), new com.yunbao.common.http.base.HttpCallback<StarChallengeStatusModel>() {
@Override
public void onSuccess(StarChallengeStatusModel data) {
if (mLiveRoomViewHolder != null) {
activityUrl = data.getActivityUrl();
mLiveRoomViewHolder.showStart(data);
}
}
@Override
public void onError(String error) {
}
});
}
@Override

View File

@ -1251,7 +1251,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
if (event.isTime()) {
new Handler().postDelayed(() -> LiveFloatView.getInstance()
.cacheLiveData(event.getmLiveBean(), event.getmLiveType(), event.getmLiveSDK(), event.getmLiveTypeVal())
.builderFloat(mContext, event.getmLiveBean().getPull()), 1500);
.builderFloat(mContext, event.getmLiveBean().getPull()), 800);
} else {
new Handler().post(() -> LiveFloatView.getInstance()
.cacheLiveData(event.getmLiveBean(), event.getmLiveType(), event.getmLiveSDK(), event.getmLiveTypeVal())