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

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

@ -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);
@ -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);
@ -1846,19 +1846,11 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
if (!isEnterRoom) { if (!isEnterRoom) {
return; return;
} }
if (mLiveBean != null) {
isEnterRoom = false;
RongChatRoomClient.getInstance().quitChatRoom("g" + mLiveBean.getUid(), new IRongCoreCallback.OperationCallback() {
@Override
public void onSuccess() {
try {
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) {
Log.e("直播间接口调用排查","leaveRoomNew---------------");
} }
@Override @Override
@ -1867,6 +1859,15 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
}); });
leaveStream = ""; leaveStream = "";
leaveGroupId = ""; leaveGroupId = "";
if (mLiveBean != null) {
isEnterRoom = false;
RongChatRoomClient.getInstance().quitChatRoom("g" + mLiveBean.getUid(), new IRongCoreCallback.OperationCallback() {
@Override
public void onSuccess() {
try {
Log.i("tx", "退出成功" + mLiveBean.getUid());
} 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();
} }