From 2424fd1e0616a1d755418003215129b7a5341a5b Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 10 Aug 2022 19:04:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95=E9=97=AE?= =?UTF-8?q?=E9=A2=98,shouye=20ytuijian?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/yunbao/main/activity/MainActivity.java | 7 +++++-- .../main/java/com/yunbao/main/activity/SearchActivity.java | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index 94e20c2b3..d8d593a23 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -381,10 +381,13 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene public void onSuccess(LiveInfoModel data) { LiveRoomCheckLivePresenter mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, (liveBean, liveType, liveTypeVal, liveSdk) -> { - if (liveBean == null) { + //讲数据转成json + String json = GsonUtils.toJson(data); + LiveBean liveBean2 = GsonUtils.fromJson(json, LiveBean.class); + if (liveBean2 == null) { return; } - LiveAudienceActivity.forward(mContext, liveBean, liveType, liveTypeVal, "", 0, liveSdk); + LiveAudienceActivity.forward(mContext, liveBean2, liveType, liveTypeVal, "", 0, liveSdk); }); //讲数据转成json diff --git a/main/src/main/java/com/yunbao/main/activity/SearchActivity.java b/main/src/main/java/com/yunbao/main/activity/SearchActivity.java index 4bacce869..d9b1f047e 100644 --- a/main/src/main/java/com/yunbao/main/activity/SearchActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/SearchActivity.java @@ -174,10 +174,13 @@ public class SearchActivity extends AbsActivity { @Override public void onSuccess(LiveInfoModel data) { LiveRoomCheckLivePresenter mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, (liveBean, liveType, liveTypeVal, liveSdk) -> { - if (liveBean == null) { + //讲数据转成json + String json = GsonUtils.toJson(data); + LiveBean liveBean2 = GsonUtils.fromJson(json, LiveBean.class); + if (liveBean2 == null) { return; } - LiveAudienceActivity.forward(mContext, liveBean, liveType, liveTypeVal, "", 0, liveSdk); + LiveAudienceActivity.forward(mContext, liveBean2, liveType, liveTypeVal, "", 0, liveSdk); }); //讲数据转成json String json = GsonUtils.toJson(data);