fix:修复小时榜点自己直播间会跳转的问题
This commit is contained in:
parent
4e466a7868
commit
2acba510f7
@ -47,6 +47,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
|||||||
private WebView mWebView;
|
private WebView mWebView;
|
||||||
private int showType = 0;
|
private int showType = 0;
|
||||||
private boolean isFullWindow=false;
|
private boolean isFullWindow=false;
|
||||||
|
private String roomId;
|
||||||
|
|
||||||
public LiveHDDialogFragment() {
|
public LiveHDDialogFragment() {
|
||||||
|
|
||||||
@ -145,6 +146,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
|||||||
if (bundle == null) {
|
if (bundle == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
roomId=bundle.getString("roomId",null);
|
||||||
mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); // 是否允许JS打开新窗口
|
mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); // 是否允许JS打开新窗口
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||||
@ -248,6 +250,9 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
|||||||
}
|
}
|
||||||
private LiveRoomCheckLivePresenter mCheckLivePresenter;
|
private LiveRoomCheckLivePresenter mCheckLivePresenter;
|
||||||
private void gotoLive(final String live_id) {
|
private void gotoLive(final String live_id) {
|
||||||
|
if(roomId!=null&&roomId.equals(live_id)){
|
||||||
|
return;
|
||||||
|
}
|
||||||
LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() {
|
LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
|
@ -1120,6 +1120,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
bundle.putString("url", url);
|
bundle.putString("url", url);
|
||||||
bundle.putInt("height", DpUtil.dp2px(500));
|
bundle.putInt("height", DpUtil.dp2px(500));
|
||||||
bundle.putInt("show_type", 0);
|
bundle.putInt("show_type", 0);
|
||||||
|
bundle.putString("roomId",mLiveUid);
|
||||||
LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment();
|
LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment();
|
||||||
liveHDDialogFragment.setArguments(bundle);
|
liveHDDialogFragment.setArguments(bundle);
|
||||||
liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
||||||
|
Loading…
Reference in New Issue
Block a user