修复直播设置密码房无反应问题

This commit is contained in:
zlzw 2022-11-08 13:27:56 +08:00
parent 80d5bf3007
commit 3e7279b4de

View File

@ -66,8 +66,6 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
private int mLiveType;//房间类型
private int mLiveTypeVal;//房间密码门票收费金额
private int mLiveTimeCoin;//计时收费金额
private ActivityResultCallback mActivityResultCallback;
private CommonCallback<LiveRoomTypeBean> mLiveTypeCallback;
private boolean mOpenLocation = true;
private int mLiveSdk;
private LiveClassBean classBean;
@ -165,32 +163,6 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
findViewById(R.id.btn_start_live).setOnClickListener(this);
findViewById(R.id.btn_wishlist).setOnClickListener(this);
findViewById(R.id.btn_horizontally).setOnClickListener(this);
mActivityResultCallback = new ActivityResultCallback() {
@Override
public void onSuccess(Intent intent) {
mLiveClassID = intent.getIntExtra(Constants.CLASS_ID, 0);
mLiveClass.setText(intent.getStringExtra(Constants.CLASS_NAME));
}
};
mLiveTypeCallback = new CommonCallback<LiveRoomTypeBean>() {
@Override
public void callback(LiveRoomTypeBean bean) {
switch (bean.getId()) {
case Constants.LIVE_TYPE_NORMAL:
onLiveTypeNormal(bean);
break;
case Constants.LIVE_TYPE_PWD:
onLiveTypePwd(bean);
break;
case Constants.LIVE_TYPE_PAY:
onLiveTypePay(bean);
break;
case Constants.LIVE_TYPE_TIME:
onLiveTypeTime(bean);
break;
}
}
};
manager = new FaceManager();
manager.setFaceStatusChanged(new FaceManager.FaceStatusChanged() {
final Handler handler = new Handler(Looper.getMainLooper());
@ -382,7 +354,25 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
bundle.putInt(Constants.CHECKED_ID, mLiveType);
LiveNewRoomTypeDialogFragment fragment = new LiveNewRoomTypeDialogFragment();
fragment.setArguments(bundle);
fragment.setCallback(mLiveTypeCallback);
fragment.setCallback(new CommonCallback<LiveRoomTypeBean>() {
@Override
public void callback(LiveRoomTypeBean bean) {
switch (bean.getId()) {
case Constants.LIVE_TYPE_NORMAL:
onLiveTypeNormal(bean);
break;
case Constants.LIVE_TYPE_PWD:
onLiveTypePwd(bean);
break;
case Constants.LIVE_TYPE_PAY:
onLiveTypePay(bean);
break;
case Constants.LIVE_TYPE_TIME:
onLiveTypeTime(bean);
break;
}
}
});
fragment.show(((LiveRyAnchorActivity) mContext).getSupportFragmentManager(), "LiveRoomTypeDialogFragment");
}
@ -529,8 +519,6 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
public void release() {
mImageUtil = null;
mActivityResultCallback = null;
mLiveTypeCallback = null;
}
@Override