From 1198a8f1d89293e0a11d0d7c308c573556c3e284 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Thu, 15 Jun 2023 15:27:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=81=E7=A4=BC=E4=BA=A4=E4=BA=92=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/res/values-en-rUS/string.xml | 1 + common/src/main/res/values-zh-rHK/strings.xml | 1 + common/src/main/res/values-zh-rTW/strings.xml | 1 + common/src/main/res/values-zh/strings.xml | 1 + common/src/main/res/values/strings.xml | 1 + config.gradle | 4 ++-- .../live/dialog/LiveGiftDialogFragment.java | 16 +++++++++++++++- .../yunbao/live/views/LiveRoomViewHolder.java | 12 ++++++++---- .../main/res/layout/view_enter_room_leave.xml | 2 +- 9 files changed, 31 insertions(+), 8 deletions(-) diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml index 94ecd406a..567557012 100644 --- a/common/src/main/res/values-en-rUS/string.xml +++ b/common/src/main/res/values-en-rUS/string.xml @@ -1193,4 +1193,5 @@ Limited ride And limited avatar frame %s is extracted from %s %S sent to %s Over the maximum value + Insufficient balance, continue to recharge diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index 2250a1b9c..2ff2a2d87 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1188,4 +1188,5 @@ %s在%s中抽取到了 %S送给了%s 超过最大值 + 餘額不足,繼續充值 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index c928ed64d..47e96ef43 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1187,4 +1187,5 @@ %s在%s中抽取到了 %S送给了%s 超过最大值 + 餘額不足,繼續充值 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index d6b8c690f..d120b5b8a 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1188,4 +1188,5 @@ %s在%s中抽取到了 %S送给了%s 超过最大值 + 餘額不足,繼續充值 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 3f0fb1775..5dcfc909b 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1194,4 +1194,5 @@ Limited ride And limited avatar frame %S sent to %s Create Vote Error Over the maximum value + Insufficient balance, continue to recharge diff --git a/config.gradle b/config.gradle index d6b55db99..237f93aa1 100644 --- a/config.gradle +++ b/config.gradle @@ -9,9 +9,9 @@ ext { ] manifestPlaceholders = [ //正式、 - serverHost : "https://napi.yaoulive.com", +// serverHost : "https://napi.yaoulive.com", // 测试 -// serverHost : "https://ceshi.yaoulive.com", + serverHost : "https://ceshi.yaoulive.com", //腾讯地图 txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java index 7b06cd904..bf6ed4058 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiftDialogFragment.java @@ -4,6 +4,7 @@ import static com.yunbao.common.CommonAppConfig.isGetNewWrap; import static com.yunbao.common.utils.RouteUtil.PATH_COIN; import static com.yunbao.live.views.LiveRoomViewHolder.bean1; +import android.app.Dialog; import android.content.DialogInterface; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; @@ -155,6 +156,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On DialogInterface.OnShowListener onShowListener; private SVGAImageView blindSvga, blindBoxOpen; private View close_view; + @Override protected int getLayoutId() { return R.layout.dialog_live_gift_wrap; @@ -1038,7 +1040,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On if (mLiveGiftBean.getType() == LiveGiftBean2.TYPE_NORMAL && !mLiveGiftBean.getSwf().contains("svga")) { showLianBtn(); } - if (mLiveGiftBean.getType()==7){ + if (mLiveGiftBean.getType() == 7) { showLianBtn(); } //刷新包裹列表wrap_gift_num -1:表示数量没有变化 @@ -1085,6 +1087,18 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On AppManager.runDebugCode(() -> { Log.i("gifBean", mLiveGiftBean.toString()); }); + } else if (code == 1001) { + hideLianBtn(); + new DialogUitl.Builder(mContext) + .setView(R.layout.dialog_live_unfollow) + .setConfirmString(getString(R.string.charge)) + .setContent(getString(R.string.insufficient_balance)) + .setClickCallback(new DialogUitl.SimpleCallback() { + @Override + public void onConfirmClick(Dialog dialog, String content) { + forwardMyCoin(0); + } + }).build().show(); } else { hideLianBtn(); ToastUtil.show(msg); diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 9117747d5..ae795ffbd 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -2633,17 +2633,21 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis getIsHot(); getGuardInfo(); } + } private void getGuardInfo() { LiveHttpUtil.getUserList(mLiveUid, mStream, "guard", 1, new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { - JSONObject json = JSONObject.parseObject(info[0]); - JSONArray userlist = json.getJSONArray("userlist"); - if (userlist.size() != 0) { - setGuardIcon(JSONArray.parseArray(userlist.toJSONString(), LiveUserGiftBean.class).get(0)); + if (code == 0) { + JSONObject json = JSONObject.parseObject(info[0]); + JSONArray userlist = json.getJSONArray("userlist"); + if (userlist.size() != 0) { + setGuardIcon(JSONArray.parseArray(userlist.toJSONString(), LiveUserGiftBean.class).get(0)); + } } + } }); } diff --git a/live/src/main/res/layout/view_enter_room_leave.xml b/live/src/main/res/layout/view_enter_room_leave.xml index 290d834eb..9d9e3d854 100644 --- a/live/src/main/res/layout/view_enter_room_leave.xml +++ b/live/src/main/res/layout/view_enter_room_leave.xml @@ -41,7 +41,7 @@ android:layout_marginEnd="6dp" android:text="@string/come_hint" android:textColor="#fff" - android:textSize="10sp" /> + android:textSize="12sp" />