测试更改

This commit is contained in:
18401019693 2022-11-18 17:40:37 +08:00
parent 009efc2c86
commit 3deb3693b3
4 changed files with 27 additions and 42 deletions

View File

@ -90,7 +90,6 @@ import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.AbsMainViewHolder; import com.yunbao.common.views.AbsMainViewHolder;
import com.yunbao.common.views.floatingview.APPEasyFloat; import com.yunbao.common.views.floatingview.APPEasyFloat;
import com.yunbao.common.views.weight.LiveFloatView; import com.yunbao.common.views.weight.LiveFloatView;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.activity.LiveAudienceActivity; import com.yunbao.live.activity.LiveAudienceActivity;
import com.yunbao.live.http.LiveHttpConsts; import com.yunbao.live.http.LiveHttpConsts;
import com.yunbao.live.http.LiveHttpUtil; import com.yunbao.live.http.LiveHttpUtil;
@ -634,25 +633,22 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
// }); // });
public void mainClick(View v) { public void mainClick(View v) {
ViewClicksAntiShake.clicksAntiShake(v, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override if (!canClick()) {
public void onViewClicks() { return;
if (!canClick()) { }
return; int i = v.getId();
} if (i == R.id.btn_start) {
int i = v.getId(); showStartDialog();
if (i == R.id.btn_start) { } else if (i == R.id.btn_search) {
showStartDialog(); SearchActivity.forward(mContext);
} else if (i == R.id.btn_search) { } else if (i == R.id.btn_follow) {
SearchActivity.forward(mContext); //关注
} else if (i == R.id.btn_follow) { FollowActivity.forward(mContext, CommonAppConfig.getInstance().getUid(), 0);
//关注 } else if (i == R.id.img_trophy) {
FollowActivity.forward(mContext, CommonAppConfig.getInstance().getUid(), 0); MainListActivity.forward(mContext, 0);
} else if (i == R.id.img_trophy) { }
MainListActivity.forward(mContext, 0);
}
}
});
} }

View File

@ -46,7 +46,7 @@ public class SettingAdapter extends RecyclerView.Adapter {
mOnClickListener = new View.OnClickListener() { mOnClickListener = new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
ViewClicksAntiShake.clicksAntiShake(v, () -> {
Object tag = v.getTag(); Object tag = v.getTag();
if (tag != null) { if (tag != null) {
int position = (int) tag; int position = (int) tag;
@ -58,7 +58,7 @@ public class SettingAdapter extends RecyclerView.Adapter {
mOnItemClickListener.onItemClick(bean, position); mOnItemClickListener.onItemClick(bean, position);
} }
} }
});
} }
}; };

View File

@ -227,34 +227,23 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl
} }
private LiveRoomCheckLivePresenter mCheckLivePresenter;
private void gotoLive(final String live_id) { private void gotoLive(final String live_id) {
LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() { LiveHttpUtil.getLiveInfo(live_id + "", new HttpCallback() {
@Override @Override
public void onSuccess(int code, String msg, String[] info) { public void onSuccess(int code, String msg, String[] info) {
if (code == 0 && info.length > 0) { if (code == 0 && info.length > 0) {
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class); LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
if (mCheckLivePresenter == null) { LiveAudienceActivity.forward(mContext, liveBean, 0, 0, "", 0, 0);
mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, new LiveRoomCheckLivePresenter.ActionListener() {
@Override
public void onLiveRoomChanged(LiveBean liveBean, int liveType, int liveTypeVal, int liveSdk) {
if (liveBean == null) {
return;
}
LiveAudienceActivity.forward(mContext, liveBean, liveType, liveTypeVal, "", 0, liveSdk);
}
});
}
mCheckLivePresenter.checkLive(liveBean);
} else { } else {
RouteUtil.forwardUserHome(mContext, live_id, 0);
RouteUtil.forwardUserHome(mContext, String.valueOf(live_id), 0);
}
} }
}
}); });
} }

View File

@ -456,7 +456,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
@Override @Override
public void onClick(View v) { public void onClick(View v) {
ViewClicksAntiShake.clicksAntiShake(v, () -> {
int i = v.getId(); int i = v.getId();
if (i == R.id.lt_name) { if (i == R.id.lt_name) {
mContext.startActivity(new Intent(mContext, EditProfileActivity.class)); mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
@ -481,7 +481,7 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid(); String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" + u.getUserNiceName() + "&usernobId=" + u.getNoble_id() + "&token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid();
ZhuangBanActivity.forward(mContext, url, false); ZhuangBanActivity.forward(mContext, url, false);
} }
});