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