直播间退出接口时机修改,免费礼物的修改

This commit is contained in:
18401019693 2023-12-15 10:17:47 +08:00
parent e25980cec8
commit bd9c8c2265
2 changed files with 35 additions and 31 deletions

View File

@ -387,7 +387,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
private FrameLayout pa_pao_layout; private FrameLayout pa_pao_layout;
private LinearLayout combo_layout; private LinearLayout combo_layout;
private TextView combo_number; private TextView combo_number;
private View quick_gift_reminder ; private View quick_gift_reminder;
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
public void onUpdata(String str) { public void onUpdata(String str) {
@ -720,6 +720,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
} }
} }
} }
public void onQuickGifting3() { public void onQuickGifting3() {
IMLoginManager.get(mContext).setQuickGiftIfFirst(); IMLoginManager.get(mContext).setQuickGiftIfFirst();
quick_gift_reminder.setVisibility(View.GONE); quick_gift_reminder.setVisibility(View.GONE);
@ -1565,7 +1566,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
pa_pao_layout = (FrameLayout) findViewById(R.id.pa_pao_layout); pa_pao_layout = (FrameLayout) findViewById(R.id.pa_pao_layout);
combo_layout = (LinearLayout) findViewById(R.id.combo_layout); combo_layout = (LinearLayout) findViewById(R.id.combo_layout);
combo_number = (TextView) findViewById(R.id.combo_number); combo_number = (TextView) findViewById(R.id.combo_number);
quick_gift_reminder = findViewById(R.id.quick_gift_reminder); quick_gift_reminder = findViewById(R.id.quick_gift_reminder);
pa_pao_layout.setVisibility(View.GONE); pa_pao_layout.setVisibility(View.GONE);
combo_layout.setVisibility(View.GONE); combo_layout.setVisibility(View.GONE);
@ -2545,7 +2546,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
* @param rank 小时榜 * @param rank 小时榜
*/ */
public void setHourRankData(long rank) { public void setHourRankData(long rank) {
if (mHotText != null) { if (mHotText != null) {
if (rank == 0) { if (rank == 0) {
mHotText.setText(R.string.no_rank_data); mHotText.setText(R.string.no_rank_data);
} else { } else {
@ -2574,9 +2575,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
} }
} }
public void setHotNum(String hotNum) { public void setHotNum(String hotNum) {
setHotData(formatBigNum.formatBigNum(hotNum)); setHotData(formatBigNum.formatBigNum(hotNum));
} }
/** /**
* 更新心愿单进度 * 更新心愿单进度
* *
@ -4283,7 +4286,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
bean1.setId(Integer.parseInt(giftModel.getId())); bean1.setId(Integer.parseInt(giftModel.getId()));
bean1.setName(giftModel.getGiftname()); bean1.setName(giftModel.getGiftname());
bean1.setTag("1"); bean1.setTag("1");
bean1.setPrice(WordUtil.isNewZh() ? "免费" : "free");
if (!IMLoginManager.get(mContext).isisNewUserOne()) { if (!IMLoginManager.get(mContext).isisNewUserOne()) {
if (TextUtils.equals(taskModel.getSendgift(), "0")) { if (TextUtils.equals(taskModel.getSendgift(), "0")) {
IMLoginManager.get(mContext).setNewUserGif(true); IMLoginManager.get(mContext).setNewUserGif(true);

View File

@ -56,7 +56,6 @@ import com.yunbao.common.event.LiveFloatEvent;
import com.yunbao.common.event.LiveGiftDialogEvent; import com.yunbao.common.event.LiveGiftDialogEvent;
import com.yunbao.common.event.LiveRoomChangeEvent; import com.yunbao.common.event.LiveRoomChangeEvent;
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent; import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
import com.yunbao.common.event.QuickGiftingEvent;
import com.yunbao.common.event.SendBlindGiftEvent; import com.yunbao.common.event.SendBlindGiftEvent;
import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.CommonHttpConsts; import com.yunbao.common.http.CommonHttpConsts;
@ -809,6 +808,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
@Override @Override
public void onRemove(boolean isQuit) { public void onRemove(boolean isQuit) {
Log.e("直播间接口调用排查","onRemove---------------");
LiveNetManager.get(mContext).cancelLive(); LiveNetManager.get(mContext).cancelLive();
liveHandler.removeCallbacks(sendFIm); liveHandler.removeCallbacks(sendFIm);
linkMicPkStartHandler.removeCallbacks(linkMicPkStartRunnable); linkMicPkStartHandler.removeCallbacks(linkMicPkStartRunnable);
@ -978,7 +978,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
Conversation.ConversationType conversationType = Conversation.ConversationType.PRIVATE; Conversation.ConversationType conversationType = Conversation.ConversationType.PRIVATE;
TextMessage messageContent = TextMessage.obtain(msg.mResult.toString()); TextMessage messageContent = TextMessage.obtain(msg.mResult.toString());
io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain(liveID, conversationType, messageContent); io.rong.imlib.model.Message message = io.rong.imlib.model.Message.obtain(liveID, conversationType, messageContent);
RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() { RongIMClient.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
@Override @Override
@ -1846,6 +1846,19 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
if (!isEnterRoom) { if (!isEnterRoom) {
return; return;
} }
LiveNetManager.get(mContext)
.leaveRoomNew(leaveStream, leaveGroupId, new com.yunbao.common.http.base.HttpCallback<String>() {
@Override
public void onSuccess(String data) {
Log.e("直播间接口调用排查","leaveRoomNew---------------");
}
@Override
public void onError(String error) {
}
});
leaveStream = "";
leaveGroupId = "";
if (mLiveBean != null) { if (mLiveBean != null) {
isEnterRoom = false; isEnterRoom = false;
@ -1854,19 +1867,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
public void onSuccess() { public void onSuccess() {
try { try {
Log.i("tx", "退出成功" + mLiveBean.getUid()); Log.i("tx", "退出成功" + mLiveBean.getUid());
LiveNetManager.get(mContext)
.leaveRoomNew(leaveStream, leaveGroupId, new com.yunbao.common.http.base.HttpCallback<String>() {
@Override
public void onSuccess(String data) {
}
@Override
public void onError(String error) {
}
});
leaveStream = "";
leaveGroupId = "";
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@ -1878,19 +1879,19 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
public void onError(IRongCoreEnum.CoreErrorCode coreErrorCode) { public void onError(IRongCoreEnum.CoreErrorCode coreErrorCode) {
try { try {
Log.i("tx", "退出成功" + mLiveBean.getUid()); // Log.i("tx", "退出成功" + mLiveBean.getUid());
LiveNetManager.get(mContext) // LiveNetManager.get(mContext)
.leaveRoomNew(leaveStream, leaveGroupId, new com.yunbao.common.http.base.HttpCallback<String>() { // .leaveRoomNew(leaveStream, leaveGroupId, new com.yunbao.common.http.base.HttpCallback<String>() {
@Override // @Override
public void onSuccess(String data) { // public void onSuccess(String data) {
} // }
//
@Override // @Override
public void onError(String error) { // public void onError(String error) {
} // }
}); // });
leaveStream = ""; // leaveStream = "";
leaveGroupId = ""; // leaveGroupId = "";
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }