测试更改

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.floatingview.APPEasyFloat;
import com.yunbao.common.views.weight.LiveFloatView;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.activity.LiveAudienceActivity;
import com.yunbao.live.http.LiveHttpConsts;
import com.yunbao.live.http.LiveHttpUtil;
@ -634,25 +633,22 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
// });
public void mainClick(View v) {
ViewClicksAntiShake.clicksAntiShake(v, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
if (!canClick()) {
return;
}
int i = v.getId();
if (i == R.id.btn_start) {
showStartDialog();
} else if (i == R.id.btn_search) {
SearchActivity.forward(mContext);
} else if (i == R.id.btn_follow) {
//关注
FollowActivity.forward(mContext, CommonAppConfig.getInstance().getUid(), 0);
} else if (i == R.id.img_trophy) {
MainListActivity.forward(mContext, 0);
}
}
});
if (!canClick()) {
return;
}
int i = v.getId();
if (i == R.id.btn_start) {
showStartDialog();
} else if (i == R.id.btn_search) {
SearchActivity.forward(mContext);
} else if (i == R.id.btn_follow) {
//关注
FollowActivity.forward(mContext, CommonAppConfig.getInstance().getUid(), 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() {
@Override
public void onClick(View v) {
ViewClicksAntiShake.clicksAntiShake(v, () -> {
Object tag = v.getTag();
if (tag != null) {
int position = (int) tag;
@ -58,7 +58,7 @@ public class SettingAdapter extends RecyclerView.Adapter {
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) {
LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() {
LiveHttpUtil.getLiveInfo(live_id + "", new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
if (code == 0 && info.length > 0) {
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
if (mCheckLivePresenter == null) {
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);
LiveAudienceActivity.forward(mContext, liveBean, 0, 0, "", 0, 0);
} 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
public void onClick(View v) {
ViewClicksAntiShake.clicksAntiShake(v, () -> {
int i = v.getId();
if (i == R.id.lt_name) {
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();
ZhuangBanActivity.forward(mContext, url, false);
}
});