合并接口第四次上传
This commit is contained in:
@@ -17,6 +17,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
||||
@@ -25,8 +26,6 @@ import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.adapter.SystemChatMessageAdapter;
|
||||
import com.yunbao.live.bean.ImUserBean;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.live.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.live.event.RecommendLiveRoomEvent;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||
@@ -196,14 +195,12 @@ public class PDLIiveChatActivity extends FragmentActivity {
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
LiveRoomCheckLivePresenter mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, (liveBean1, liveType, liveTypeVal, liveSdk) -> {
|
||||
if (liveBean1 == null) {
|
||||
return;
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
||||
}
|
||||
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, liveTypeVal));
|
||||
finish();
|
||||
});
|
||||
mCheckLivePresenter.checkLive(liveBean);
|
||||
} else {
|
||||
RouteUtil.forwardUserHome(mContext, event.getLiveuid(), 0);
|
||||
}
|
||||
|
||||
@@ -43,11 +43,9 @@ 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.event.LiveRoomChangeEvent;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
@@ -289,8 +287,6 @@ public class LiveGameDialogFragment extends AbsDialogFragment {
|
||||
}
|
||||
|
||||
|
||||
private LiveRoomCheckLivePresenter mCheckLivePresenter;
|
||||
|
||||
private void gotoLive(final String live_id) {
|
||||
if (!TextUtils.equals(roomId, live_id)) {
|
||||
LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() {
|
||||
@@ -298,20 +294,12 @@ public class LiveGameDialogFragment extends AbsDialogFragment {
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
if (mCheckLivePresenter == null) {
|
||||
mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, new LiveRoomCheckLivePresenter.ActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(LiveBean liveBean, int liveType, int liveTypeVal, int liveSdk) {
|
||||
if (liveBean == null) {
|
||||
return;
|
||||
}
|
||||
dismiss();
|
||||
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, liveTypeVal));
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
mCheckLivePresenter.checkLive(liveBean);
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
RouteUtil.forwardUserHome(mContext, live_id, 0);
|
||||
}
|
||||
@@ -364,7 +352,7 @@ public class LiveGameDialogFragment extends AbsDialogFragment {
|
||||
if (event.getData() != null && !event.getData().isEmpty()) {
|
||||
onTrickerySendGiftInto(new JsWishBean(event.getData()));
|
||||
}
|
||||
} else if (TextUtils.equals(event.getMethod(), "androidMethodClickUser")) {
|
||||
} else if (TextUtils.equals(event.getMethod(), "androidMethodClickUser")) {
|
||||
if (!(mContext instanceof LiveRyAnchorActivity)) {
|
||||
//点击用户头像
|
||||
if (!TextUtils.isEmpty(event.getUserId()) && !TextUtils.isEmpty(event.getLiveId())) {
|
||||
|
||||
@@ -226,7 +226,6 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
||||
}
|
||||
|
||||
|
||||
private LiveRoomCheckLivePresenter mCheckLivePresenter;
|
||||
|
||||
private void gotoLive(final String live_id) {
|
||||
if (!TextUtils.equals(roomId, live_id)) {
|
||||
@@ -235,24 +234,12 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
if (mCheckLivePresenter == null) {
|
||||
mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, new LiveRoomCheckLivePresenter.ActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(LiveBean liveBean, int liveType, int liveTypeVal, int liveSdk) {
|
||||
if (liveBean == null) {
|
||||
return;
|
||||
}
|
||||
dismiss();
|
||||
if(MicStatusManager.getInstance().isMic()){
|
||||
MicStatusManager.getInstance().showDownMicDialog(mContext);
|
||||
return;
|
||||
}
|
||||
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, liveTypeVal));
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
mCheckLivePresenter.checkLive(liveBean);
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
RouteUtil.forwardUserHome(mContext, live_id, 0);
|
||||
}
|
||||
|
||||
@@ -137,7 +137,6 @@ public class LiveOldUserDialogFragment extends AbsDialogFragment implements View
|
||||
return true;
|
||||
}
|
||||
|
||||
private LiveRoomCheckLivePresenter mCheckLivePresenter;
|
||||
|
||||
private void gotoLive(String live_id) {
|
||||
DialogUitl.showSimpleDialog(mContext, "是否確認前往對方直播間?", new DialogUitl.SimpleCallback() {
|
||||
@@ -185,26 +184,12 @@ public class LiveOldUserDialogFragment extends AbsDialogFragment implements View
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
|
||||
if (mCheckLivePresenter == null) {
|
||||
mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, new LiveRoomCheckLivePresenter.ActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(LiveBean liveBean, int liveType, int liveTypeVal, int liveSdk) {
|
||||
if (liveBean == null) {
|
||||
return;
|
||||
}
|
||||
LiveRoomViewHolder.mHandler.removeCallbacksAndMessages(null);
|
||||
// if (mFromLiveRoom) {
|
||||
// ((UserHomeActivity) mContext).onBackPressed();
|
||||
dismiss();
|
||||
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, liveTypeVal));
|
||||
// } else {
|
||||
// LiveAudienceActivity.forward(mContext, liveBean, liveType, liveTypeVal, "", 0, liveSdk);
|
||||
// }
|
||||
}
|
||||
});
|
||||
}
|
||||
mCheckLivePresenter.checkLive(liveBean);
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -153,7 +153,6 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
|
||||
return true;
|
||||
}
|
||||
|
||||
private LiveRoomCheckLivePresenter mCheckLivePresenter;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -614,21 +613,12 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
|
||||
if (mCheckLivePresenter == null) {
|
||||
mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, new LiveRoomCheckLivePresenter.ActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(LiveBean liveBean, int liveType, int liveTypeVal, int liveSdk) {
|
||||
if (liveBean == null) {
|
||||
return;
|
||||
}
|
||||
LiveRoomViewHolder.mHandler.removeCallbacksAndMessages(null);
|
||||
dismiss();
|
||||
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, liveTypeVal));
|
||||
}
|
||||
});
|
||||
}
|
||||
mCheckLivePresenter.checkLive(liveBean);
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -74,42 +74,7 @@ public class SidebarLiveAudience extends AbsDialogFragment {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 前往直播间
|
||||
*/
|
||||
private void gotoLive(final String liveId) {
|
||||
LiveHttpUtil.getLiveInfo(liveId, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
LiveRoomCheckLivePresenter mCheckLivePresenter = new LiveRoomCheckLivePresenter(getActivity(), (liveBean1, liveType, liveTypeVal, liveSdk) -> {
|
||||
if (liveBean1 == null) {
|
||||
return;
|
||||
}
|
||||
if (MicStatusManager.getInstance().getMicStatus() == MicStatusManager.MIC_TYPE_REQUEST) {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.LIAN_MAI)
|
||||
.setMicIng(1)
|
||||
.setBean(liveBean).setLiveType(liveType).setLiveTypeVal(liveTypeVal));
|
||||
} else if (MicStatusManager.getInstance().getMicStatus() == MicStatusManager.MIC_TYPE_OPEN) {
|
||||
Bus.get().post(new LiveAudienceEvent()
|
||||
.setType(LiveAudienceEvent.LiveAudienceType.LIAN_MAI)
|
||||
.setMicIng(2)
|
||||
.setBean(liveBean).setLiveType(liveType).setLiveTypeVal(liveTypeVal));
|
||||
} else {
|
||||
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, liveTypeVal));
|
||||
}
|
||||
|
||||
});
|
||||
mCheckLivePresenter.checkLive(liveBean);
|
||||
|
||||
} else {
|
||||
RouteUtil.forwardUserHome(getActivity(), liveId, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
|
||||
@@ -47,10 +47,10 @@ import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.GiftCacheUtil;
|
||||
import com.yunbao.common.utils.HtmlTagHandler;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.bean.LiveGiftPrizePoolWinBean;
|
||||
import com.yunbao.live.bean.LiveLuckGiftWinBean;
|
||||
import com.yunbao.live.bean.LiveReceiveGiftBean;
|
||||
@@ -374,19 +374,12 @@ public class LiveGiftAnimPresenter {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
|
||||
if (mCheckLivePresenter == null) {
|
||||
mCheckLivePresenter = new LiveRoomCheckLivePresenter(mContext, new LiveRoomCheckLivePresenter.ActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(LiveBean liveBean, int liveType, int liveTypeVal, int liveSdk) {
|
||||
if (liveBean == null) {
|
||||
return;
|
||||
}
|
||||
((LiveAudienceActivity) mContext).onBackPressed();
|
||||
LiveAudienceActivity.forward(mContext, liveBean, liveType, liveTypeVal, "", 0, liveSdk);
|
||||
}
|
||||
});
|
||||
}
|
||||
mCheckLivePresenter.checkLive(liveBean);
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.views.SlideInBannerViewHolder;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||
|
||||
@@ -98,24 +97,25 @@ public class SidebarViewHoler extends RecyclerView.ViewHolder {
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
LiveRoomCheckLivePresenter mCheckLivePresenter = new LiveRoomCheckLivePresenter(itemView.getContext(), (liveBean1, liveType, liveTypeVal, liveSdk) -> {
|
||||
if (liveBean1 == null) {
|
||||
if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing())
|
||||
mShowLoadingDialog.dismiss();
|
||||
return;
|
||||
}
|
||||
Map<String, String> map = null;
|
||||
if (type == 2) {
|
||||
map = new HashMap<>();
|
||||
map.put("OPEN", "NEWUSER");
|
||||
}
|
||||
LiveAudienceActivity.forward(itemView.getContext(), liveBean1, liveType, liveTypeVal, "", map, 0, liveSdk);
|
||||
if (liveBean == null) {
|
||||
if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing())
|
||||
mShowLoadingDialog.dismiss();
|
||||
((Activity) itemView.getContext()).finish();
|
||||
return;
|
||||
}
|
||||
new LiveRoomCheckLivePresenter(mBanner.getContext(), liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||
Map<String, String> map = null;
|
||||
if (type == 2) {
|
||||
map = new HashMap<>();
|
||||
map.put("OPEN", "NEWUSER");
|
||||
}
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk));
|
||||
if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing())
|
||||
mShowLoadingDialog.dismiss();
|
||||
((Activity) itemView.getContext()).finish();
|
||||
}
|
||||
});
|
||||
mCheckLivePresenter.checkLive(liveBean);
|
||||
|
||||
} else {
|
||||
if (mShowLoadingDialog != null && mShowLoadingDialog.isShowing())
|
||||
mShowLoadingDialog.dismiss();
|
||||
|
||||
Reference in New Issue
Block a user