修复心愿单Banner连点多开问题
This commit is contained in:
parent
81933f0ad7
commit
f1554f8201
@ -1112,6 +1112,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
.setOnBannerClickListener(new OnBannerClickListener() {
|
.setOnBannerClickListener(new OnBannerClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onBannerClick(List datas, int p) {
|
public void onBannerClick(List datas, int p) {
|
||||||
|
showLoadingDialog();
|
||||||
if (mBannerList2 != null) {
|
if (mBannerList2 != null) {
|
||||||
if (p >= 0 && p < mBannerList2.size()) {
|
if (p >= 0 && p < mBannerList2.size()) {
|
||||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||||
@ -1168,6 +1169,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
.setOnBannerClickListener(new OnBannerClickListener() {
|
.setOnBannerClickListener(new OnBannerClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onBannerClick(List datas, int p) {
|
public void onBannerClick(List datas, int p) {
|
||||||
|
showLoadingDialog();
|
||||||
if (mBannerList2 != null) {
|
if (mBannerList2 != null) {
|
||||||
if (p >= 0 && p < mBannerList2.size()) {
|
if (p >= 0 && p < mBannerList2.size()) {
|
||||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||||
@ -1233,6 +1235,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
reloadIM();
|
reloadIM();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showLoadingDialog() {
|
||||||
|
final Dialog loadingDialog = DialogUitl.loadingDialog(mContext, WordUtil.getString(R.string.login_wait));
|
||||||
|
loadingDialog.show();
|
||||||
|
new Handler(Looper.getMainLooper()).postDelayed(loadingDialog::dismiss, 1000);
|
||||||
|
}
|
||||||
|
|
||||||
public void setLiveUid(String liveUid) {
|
public void setLiveUid(String liveUid) {
|
||||||
mLiveUid = liveUid;
|
mLiveUid = liveUid;
|
||||||
@ -3007,16 +3014,12 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
.setDelayTime(2800)
|
.setDelayTime(2800)
|
||||||
.setBannerStyle(BannerConfig.NOT_INDICATOR)
|
.setBannerStyle(BannerConfig.NOT_INDICATOR)
|
||||||
.setOnBannerClickListener(new OnBannerClickListener() {
|
.setOnBannerClickListener(new OnBannerClickListener() {
|
||||||
Dialog loadingDialog;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBannerClick(List datas, int p) {
|
public void onBannerClick(List datas, int p) {
|
||||||
Log.i("debug", "onBannerClick: " + mBannerList4.get(p).toString());
|
Log.i("debug", "onBannerClick: " + mBannerList4.get(p).toString());
|
||||||
BannerBean bean = mBannerList4.get(p);
|
BannerBean bean = mBannerList4.get(p);
|
||||||
if (loadingDialog == null) {
|
showLoadingDialog();
|
||||||
loadingDialog = DialogUitl.loadingDialog(mContext, WordUtil.getString(R.string.login_wait));
|
|
||||||
}
|
|
||||||
loadingDialog.setOnShowListener(dialog -> {
|
|
||||||
if (bean.getActivityId() == -1) {//-1写死跳活动弹窗
|
if (bean.getActivityId() == -1) {//-1写死跳活动弹窗
|
||||||
Bus.get().post(new LiveAudienceEvent()
|
Bus.get().post(new LiveAudienceEvent()
|
||||||
.setActivity(true)
|
.setActivity(true)
|
||||||
@ -3029,14 +3032,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
fragment.setRoomId(mLiveUid);
|
fragment.setRoomId(mLiveUid);
|
||||||
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGameDialogFragment");
|
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveGameDialogFragment");
|
||||||
}
|
}
|
||||||
});
|
|
||||||
loadingDialog.show();
|
|
||||||
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
|
||||||
if (loadingDialog != null && loadingDialog.isShowing()) {
|
|
||||||
loadingDialog.dismiss();
|
|
||||||
}
|
|
||||||
loadingDialog = null;
|
|
||||||
}, 300);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3060,12 +3055,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
bundle1.putString("url", url);
|
bundle1.putString("url", url);
|
||||||
LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment();
|
LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment();
|
||||||
liveHDDialogFragment.setArguments(bundle1);
|
liveHDDialogFragment.setArguments(bundle1);
|
||||||
liveHDDialogFragment.setShowListener(dialog1 -> {
|
|
||||||
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
|
||||||
loadingDialog.dismiss();
|
|
||||||
loadingDialog = null;
|
|
||||||
}, 300);
|
|
||||||
});
|
|
||||||
liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user