From d2f508699c4880c010d8ad83e0f9ad4d7f76caca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=9A=AE?= <14840170+lao-pi123@user.noreply.gitee.com> Date: Mon, 4 Nov 2024 10:39:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=AF=E5=8A=A8=E6=97=B6?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E9=97=AA=E9=80=80=E6=97=A5=E5=BF=97=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=88DialogFragment=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/live/views/LiveRoomViewHolder.java | 3 +++ .../com/yunbao/main/activity/LoginActivity.java | 17 +++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) 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 182f31fa1..bad22304b 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -5342,6 +5342,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis String isFreeGift = newPeopleTask.getIs_free_gift(); + + Log.i("TestFreeGift", "newPeopleTask.getIs_free_gift(): " + isFreeGift); + if (taskModel != null) { GiftModel giftModel = newPeopleTask.getGift(); if (giftModel != null) { diff --git a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java index f50dff2fa..6352efa82 100644 --- a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java @@ -288,7 +288,13 @@ public class LoginActivity extends AbsActivity { getBaseUserInfo(); } else { ToastUtil.show(msg); - loadingDialog.dismiss(); + try { + if(loadingDialog!=null && loadingDialog.isAdded()){ + loadingDialog.dismiss(); + } + }catch (Exception e){ + e.printStackTrace(); + } } } @@ -321,11 +327,14 @@ public class LoginActivity extends AbsActivity { } else { MainActivity.forward(LoginActivity.this, false); } - if(loadingDialog!=null){ - loadingDialog.dismiss(); + try { + if(loadingDialog!=null && loadingDialog.isAdded()){ + loadingDialog.dismiss(); + } + }catch (Exception e){ + e.printStackTrace(); } finish(); - } @Override