6.5.4礼物冠名

This commit is contained in:
18401019693 2023-08-04 13:57:36 +08:00
parent 04259472a1
commit d5ca010ec7
6 changed files with 23 additions and 9 deletions

View File

@ -897,6 +897,6 @@ public interface PDLiveApi {
Observable<ResponseModel<MedalAchievementModel>> getUserMedalList(@Query("to_uid") String toUid);
@GET("/api/public/?service=Gift.getLiveMedalList")
Observable<ResponseModel<MedalAchievementModel>> getLiveMedalList();
Observable<ResponseModel<MedalAchievementModel>> getLiveMedalList( @Query("liveuid") String liveUid);
}

View File

@ -63,6 +63,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
import retrofit2.http.Query;
/**
@ -1977,9 +1978,9 @@ public class LiveNetManager {
}).isDisposed();
}
public void getLiveMedalList(HttpCallback<MedalAchievementModel> callback) {
public void getLiveMedalList( String liveUid,HttpCallback<MedalAchievementModel> callback) {
API.get().pdLiveApi(mContext)
.getLiveMedalList()
.getLiveMedalList(liveUid)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<MedalAchievementModel>>() {

View File

@ -125,7 +125,7 @@ public class GiftWallActivity extends AbsActivity {
public void onViewClicks() {
new XPopup.Builder(GiftWallActivity.this)
.enableDrag(false)
.asCustom(new MedalAchievementPopup(GiftWallActivity.this, false, mLiveUid))
.asCustom(new MedalAchievementPopup(GiftWallActivity.this, false, mLiveUid,mLiveUid))
.show();
}
});

View File

@ -50,6 +50,7 @@ import com.yunbao.common.bean.LiveUserGiftBean;
import com.yunbao.common.bean.MicUserBean;
import com.yunbao.common.bean.UserBean;
import com.yunbao.common.dialog.NotCancelableDialog;
import com.yunbao.common.event.GiftWallIlluminateEvent;
import com.yunbao.common.event.LoginInvalidEvent;
import com.yunbao.common.event.SendBlindGiftEvent;
import com.yunbao.common.http.CommonHttpConsts;
@ -792,6 +793,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
mLiveRoomViewHolder.startAnchorLight();
//初始化女神说
mLiveRoomViewHolder.initAnchorSay();
mLiveRoomViewHolder.setGiftWall(obj.getString("gift_wall_lighten_number"),obj.getString("gift_wall_lighten_total"));
}
if (mLiveAnchorViewHolder == null) {
mLiveAnchorViewHolder = new LiveRyAnchorViewHolder(mContext, mContainer);
@ -1654,9 +1656,19 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
mLiveRoomViewHolder.blindBoxAllServerNotify(event.getAllServerNotifyEvent());
}
break;
case GIFT_WALL:
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.showGiftWall(event.getUid());
}
break;
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void GiftWallIlluminateEvent(GiftWallIlluminateEvent event) {
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.setGiftWall(String.valueOf(event.getNewNumber()), String.valueOf(event.getMaxNumber()));
}
}
/**
* 检查指定直播间连麦人数
*

View File

@ -145,7 +145,7 @@ public class GiftWallDialog extends AbsDialogFragment {
public void onViewClicks() {
new XPopup.Builder(getContext())
.enableDrag(false)
.asCustom(new MedalAchievementPopup(getContext(), isLive, toUid))
.asCustom(new MedalAchievementPopup(getContext(), isLive, toUid,mLiveUid))
.show();
}
});

View File

@ -22,15 +22,16 @@ import com.yunbao.live.activity.ZhuangBanActivity;
public class MedalAchievementPopup extends BottomPopupView {
private boolean isLive;
private String toUid;
private String toUid,mLiveUid;
private TextView achievementText;
private RecyclerView achievementList;
private MedalAchievementAdapter medalAchievementAdapter;
public MedalAchievementPopup(@NonNull Context context, boolean isLive, String toUid) {
public MedalAchievementPopup(@NonNull Context context, boolean isLive, String toUid, String mLiveUid) {
super(context);
this.isLive = isLive;
this.toUid = toUid;
this.mLiveUid = mLiveUid;
}
// 返回自定义弹窗的布局
@ -50,7 +51,7 @@ public class MedalAchievementPopup extends BottomPopupView {
private void initDate() {
if (isLive) {
LiveNetManager.get(getContext())
.getLiveMedalList(new HttpCallback<MedalAchievementModel>() {
.getLiveMedalList(mLiveUid,new HttpCallback<MedalAchievementModel>() {
@Override
public void onSuccess(MedalAchievementModel data) {
StringBuffer stringBuffer = new StringBuffer();