修复主播用户名片点击粉丝团/守护席跳转的是当前直播间的粉丝团/守护席

This commit is contained in:
zlzw 2022-11-18 16:33:07 +08:00
parent 2c13c3dce1
commit a3ad9a17c7
2 changed files with 17 additions and 6 deletions

View File

@ -1200,7 +1200,13 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
* 守护列表弹窗 * 守护列表弹窗
*/ */
public void openNewGuardListWindow(boolean showBuyView) { public void openNewGuardListWindow(boolean showBuyView) {
LiveHttpUtil.getGuardList(mLiveUid, 1, new HttpCallback() { openNewGuardListWindow(showBuyView,null);
}
public void openNewGuardListWindow(boolean showBuyView,String uid) {
if(uid==null){
uid=mLiveUid;
}
LiveHttpUtil.getGuardList(uid, 1, new HttpCallback() {
@Override @Override
public void onSuccess(int code, String msg, String[] info) { public void onSuccess(int code, String msg, String[] info) {
List<GuardUserBean> list = JSON.parseArray(Arrays.toString(info), GuardUserBean.class); List<GuardUserBean> list = JSON.parseArray(Arrays.toString(info), GuardUserBean.class);
@ -1226,16 +1232,21 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
* 打開粉絲團 * 打開粉絲團
*/ */
public void openFansWindow() { public void openFansWindow() {
openFansWindow(null);
}
public void openFansWindow(String uid) {
if(uid==null){
uid=mLiveUid;
}
LiveFansFragment fragment = new LiveFansFragment(mContext); LiveFansFragment fragment = new LiveFansFragment(mContext);
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
//粉絲團粉絲團 //粉絲團粉絲團
//不是粉絲 //不是粉絲
if (LiveAudienceActivity.is_fans != null && LiveAudienceActivity.is_fans.equals("2")) { if (LiveAudienceActivity.is_fans != null && LiveAudienceActivity.is_fans.equals("2")) {
bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/joinFansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid); bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/joinFansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + uid);
} else { } else {
bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/fansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid); bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/fansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + uid);
} }
fragment.setArguments(bundle); fragment.setArguments(bundle);
fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment"); fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");

View File

@ -648,13 +648,13 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
} else if (i == R.id.avatar) { } else if (i == R.id.avatar) {
forwardHomePage(); forwardHomePage();
} else if (i == R.id.btn_guard) { } else if (i == R.id.btn_guard) {
((LiveActivity) mContext).openNewGuardListWindow(mContext instanceof LiveRyAnchorActivity); ((LiveActivity) mContext).openNewGuardListWindow(mContext instanceof LiveRyAnchorActivity,mToUid);
} else if (i == R.id.btn_live) { } else if (i == R.id.btn_live) {
gotoLive(mToUid); gotoLive(mToUid);
} else if (i == R.id.noble_icon_layout) { } else if (i == R.id.noble_icon_layout) {
if (isAnchor) { if (isAnchor) {
dismiss(); dismiss();
((LiveActivity) mContext).openFansWindow(); ((LiveActivity) mContext).openFansWindow(mToUid);
} }
} else if (i == R.id.btn_setting) { } else if (i == R.id.btn_setting) {
setting(); setting();