From 3982afb0d3b8893a3947cd26e4ba626a51fcdac5 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Thu, 14 Dec 2023 17:39:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=95=B4=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/MainHomeCommunityViewHolder.java | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java index 1e9439930..3dfe440ee 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java @@ -3,6 +3,7 @@ package com.yunbao.main.views; import static android.content.Context.CLIPBOARD_SERVICE; import android.app.Activity; +import android.app.Dialog; import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; @@ -30,21 +31,23 @@ import androidx.annotation.RequiresApi; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.lxj.xpopup.XPopup; +import com.momo.mcamera.util.JsonUtil; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; import com.yunbao.common.HtmlConfig; +import com.yunbao.common.bean.CoolConfig; import com.yunbao.common.bean.LiveBean; -import com.yunbao.common.dialog.ActivateEliteBattleOrderPopupWindow; -import com.yunbao.common.dialog.LiberalBattlePassPopupWindow; -import com.yunbao.common.dialog.PromotionElitePopupWindow; -import com.yunbao.common.dialog.RuleOfWarPopupWindow; +import com.yunbao.common.bean.NativeCallbackModel; +import com.yunbao.common.dialog.CinemaTicketPopupWindow; import com.yunbao.common.event.JavascriptInterfaceEvent; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.LiveHttpUtil; +import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.DeviceUtils; +import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.JavascriptInterfacePlayLetUtils; import com.yunbao.common.utils.JavascriptInterfaceUtils; @@ -52,9 +55,11 @@ import com.yunbao.common.utils.L; import com.yunbao.common.utils.LiveRoomCheckLivePresenter; import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.live.views.LoadingView; import com.yunbao.main.R; import com.yunbao.main.activity.MainActivity; +import com.yunbao.main.activity.MyWalletActivity; import com.yunbao.main.dialog.EncourageDialog; import com.yunbao.main.utils.BottomBarUtil; import com.yunbao.share.ui.SharePopDialog; @@ -389,14 +394,13 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl .setAnchorAvatar(json.getString("avatar")) .showDialog(); } else if (TextUtils.equals(event.getMethod(), "postWeakBalance")) { - - LiveNetManager.get(mContext). getCoolConfig(new com.yunbao.common.http.base.HttpCallback() { @Override public void onSuccess(CoolConfig data) { new XPopup.Builder(mContext) .enableDrag(false) + .autoOpenSoftInput(false) .maxWidth(DeviceUtils.getScreenHeight((Activity) mContext) - DpUtil.dp2px(34)) .asCustom(new CinemaTicketPopupWindow(mContext, data.setTicketCount(event.getCoolConfig().getTicketCount()), new CinemaTicketPopupWindow.CinemaTicketPopupWindowCallBack() { @Override @@ -415,6 +419,7 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl } }); } else if (TextUtils.equals(data, "1")) { + ToastUtil.show(WordUtil.isNewZh() ? "兑换成功" : "Successful exchange"); mWebView.post(new Runnable() { @Override public void run() { @@ -434,16 +439,15 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl } })).show(); - } + } - @Override - public void onError (String error){ - ToastUtil.show(error); + @Override + public void onError(String error) { + ToastUtil.show(error); + } + }); } -// }); - + } } + } - } - - }