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

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 LinearLayout combo_layout;
private TextView combo_number;
private View quick_gift_reminder ;
private View quick_gift_reminder;
@Subscribe(threadMode = ThreadMode.MAIN)
public void onUpdata(String str) {
@ -720,6 +720,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}
}
}
public void onQuickGifting3() {
IMLoginManager.get(mContext).setQuickGiftIfFirst();
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);
combo_layout = (LinearLayout) findViewById(R.id.combo_layout);
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);
combo_layout.setVisibility(View.GONE);
@ -2545,7 +2546,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
* @param rank 小时榜
*/
public void setHourRankData(long rank) {
if (mHotText != null) {
if (mHotText != null) {
if (rank == 0) {
mHotText.setText(R.string.no_rank_data);
} else {
@ -2574,9 +2575,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}
}
public void setHotNum(String hotNum) {
setHotData(formatBigNum.formatBigNum(hotNum));
}
/**
* 更新心愿单进度
*
@ -4283,7 +4286,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
bean1.setId(Integer.parseInt(giftModel.getId()));
bean1.setName(giftModel.getGiftname());
bean1.setTag("1");
bean1.setPrice(WordUtil.isNewZh() ? "免费" : "free");
if (!IMLoginManager.get(mContext).isisNewUserOne()) {
if (TextUtils.equals(taskModel.getSendgift(), "0")) {
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.LiveRoomChangeEvent;
import com.yunbao.common.event.LiveSudGamePopupShowOrHideEvent;
import com.yunbao.common.event.QuickGiftingEvent;
import com.yunbao.common.event.SendBlindGiftEvent;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.CommonHttpConsts;
@ -809,6 +808,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
@Override
public void onRemove(boolean isQuit) {
Log.e("直播间接口调用排查","onRemove---------------");
LiveNetManager.get(mContext).cancelLive();
liveHandler.removeCallbacks(sendFIm);
linkMicPkStartHandler.removeCallbacks(linkMicPkStartRunnable);
@ -978,7 +978,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
Conversation.ConversationType conversationType = Conversation.ConversationType.PRIVATE;
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() {
@Override
@ -1846,6 +1846,19 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
if (!isEnterRoom) {
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) {
isEnterRoom = false;
@ -1854,19 +1867,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
public void onSuccess() {
try {
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) {
e.printStackTrace();
@ -1878,19 +1879,19 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
public void onError(IRongCoreEnum.CoreErrorCode coreErrorCode) {
try {
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 = "";
// 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) {
e.printStackTrace();
}