diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java index f3a4d06d2..205dccc80 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java @@ -34,6 +34,7 @@ import com.yunbao.common.utils.ToastUtil; import com.yunbao.live.R; import com.yunbao.live.activity.LiveActivity; import com.yunbao.live.activity.LiveAudienceActivity; +import com.yunbao.live.activity.LiveRyAnchorActivity; import com.yunbao.live.activity.ZhuangBanActivity; import com.yunbao.live.bean.LiveBean; import com.yunbao.live.event.LiveRoomChangeEvent; @@ -194,6 +195,9 @@ public class LiveHDDialogFragment extends AbsDialogFragment { @JavascriptInterface public String androidMethodClickUser(String userId, String liveId) { + if(mContext instanceof LiveRyAnchorActivity){ + return ""; + } //点击用户头像 if (!TextUtils.isEmpty(userId) && !TextUtils.isEmpty(liveId)) { showUserDialog(userId, liveId); @@ -222,7 +226,9 @@ public class LiveHDDialogFragment extends AbsDialogFragment { @JavascriptInterface public void androidMethodLookToLive(String liveId) { - + if(mContext instanceof LiveRyAnchorActivity){ + return; + } mWebView.post(new Runnable() { @Override public void run() { 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 27b66ff9a..5e7a0c81f 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -54,6 +54,7 @@ import com.opensource.svgaplayer.SVGAParser; import com.opensource.svgaplayer.SVGAVideoEntity; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; +import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.bean.BannerBean; import com.yunbao.common.bean.HourRank; import com.yunbao.common.bean.LevelBean; @@ -1202,9 +1203,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis flipper.addView(hotView); flipper.addView(hourView); flipper.startFlipping(); - if (mContext instanceof LiveRyAnchorActivity) { - return; - } flipper.setOnClickListener(view -> { Bundle bundle = new Bundle(); String path = info.get(0).getUrl(); @@ -1220,7 +1218,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis bundle.putString("roomId", mLiveUid); LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment(); liveHDDialogFragment.setArguments(bundle); - liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment"); + liveHDDialogFragment.show(((AbsActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment"); }); }