密码房逻辑更改
This commit is contained in:
parent
25252b013b
commit
44c6e5e4cd
@ -286,7 +286,6 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
if (code == 0 && info.length > 0) {
|
if (code == 0 && info.length > 0) {
|
||||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||||
LiveRoomCheckLivePresenter.isRoom = true;
|
|
||||||
LiveRoomCheckLivePresenter mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, (liveBean1, liveType, liveTypeVal, liveSdk) -> {
|
LiveRoomCheckLivePresenter mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, (liveBean1, liveType, liveTypeVal, liveSdk) -> {
|
||||||
//主播正在直播
|
//主播正在直播
|
||||||
if (liveBean1 == null) {
|
if (liveBean1 == null) {
|
||||||
|
@ -269,7 +269,6 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
|||||||
if (code == 0 && info.length > 0) {
|
if (code == 0 && info.length > 0) {
|
||||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||||
if (mCheckLivePresenter == null) {
|
if (mCheckLivePresenter == null) {
|
||||||
LiveRoomCheckLivePresenter.isRoom = false;
|
|
||||||
mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, new LiveRoomCheckLivePresenter.ActionListener() {
|
mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, new LiveRoomCheckLivePresenter.ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onLiveRoomChanged(LiveBean liveBean, int liveType, int liveTypeVal, int liveSdk) {
|
public void onLiveRoomChanged(LiveBean liveBean, int liveType, int liveTypeVal, int liveSdk) {
|
||||||
|
@ -106,27 +106,23 @@ public class LiveRoomCheckLivePresenter {
|
|||||||
* 前往密码房间
|
* 前往密码房间
|
||||||
*/
|
*/
|
||||||
private void forwardPwdRoom() {
|
private void forwardPwdRoom() {
|
||||||
if (!isRoom) {
|
DialogUitl.showSimpleInputDialog(mContext, WordUtil.getString(R.string.live_input_password), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, new DialogUitl.SimpleCallback() {
|
||||||
DialogUitl.showSimpleInputDialog(mContext, WordUtil.getString(R.string.live_input_password), DialogUitl.INPUT_TYPE_NUMBER_PASSWORD, new DialogUitl.SimpleCallback() {
|
@Override
|
||||||
@Override
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
public void onConfirmClick(Dialog dialog, String content) {
|
if (TextUtils.isEmpty(content)) {
|
||||||
if (TextUtils.isEmpty(content)) {
|
ToastUtil.show(WordUtil.getString(R.string.live_input_password));
|
||||||
ToastUtil.show(WordUtil.getString(R.string.live_input_password));
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
String password = MD5Util.getMD5(content);
|
|
||||||
if (mLiveTypeMsg.equalsIgnoreCase(password)) {
|
|
||||||
dialog.dismiss();
|
|
||||||
enterLiveRoom();
|
|
||||||
} else {
|
|
||||||
ToastUtil.show(WordUtil.getString(R.string.live_password_error));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
String password = MD5Util.getMD5(content);
|
||||||
} else {
|
if (mLiveTypeMsg.equalsIgnoreCase(password)) {
|
||||||
enterLiveRoom();
|
dialog.dismiss();
|
||||||
isRoom = false;
|
enterLiveRoom();
|
||||||
}
|
} else {
|
||||||
|
ToastUtil.show(WordUtil.getString(R.string.live_password_error));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3011,7 +3011,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
* 前往直播间
|
* 前往直播间
|
||||||
*/
|
*/
|
||||||
private void gotoLive(final String liveId) {
|
private void gotoLive(final String liveId) {
|
||||||
LiveRoomCheckLivePresenter.isRoom = false;
|
|
||||||
LiveHttpUtil.getLiveInfo(liveId, new HttpCallback() {
|
LiveHttpUtil.getLiveInfo(liveId, new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
|
Loading…
Reference in New Issue
Block a user