6.5.4礼物冠名
This commit is contained in:
parent
dffa71e346
commit
aa809ebaf4
@ -913,12 +913,14 @@ public interface PDLiveApi {
|
|||||||
*/
|
*/
|
||||||
@GET("/api/public/?service=Gift.getGiftGuide")
|
@GET("/api/public/?service=Gift.getGiftGuide")
|
||||||
Observable<ResponseModel<List<GiftGuideModel>>> getGiftGuide(
|
Observable<ResponseModel<List<GiftGuideModel>>> getGiftGuide(
|
||||||
@Query("liveuid") String liveUid
|
@Query("liveuid") String liveUid,
|
||||||
|
@Query("to_uid") String toUid
|
||||||
);
|
);
|
||||||
|
|
||||||
@GET("/api/public/?service=Gift.getGiftGuideHistory")
|
@GET("/api/public/?service=Gift.getGiftGuideHistory")
|
||||||
Observable<ResponseModel<List<GiftGuideModel>>> getGiftGuideHistory(
|
Observable<ResponseModel<List<GiftGuideModel>>> getGiftGuideHistory(
|
||||||
@Query("liveuid") String liveUid
|
@Query("liveuid") String liveUid,
|
||||||
|
@Query("to_uid") String toUid
|
||||||
);
|
);
|
||||||
|
|
||||||
@GET("/api/public/?service=Gift.getUserMedalList")
|
@GET("/api/public/?service=Gift.getUserMedalList")
|
||||||
|
@ -1984,9 +1984,9 @@ public class LiveNetManager {
|
|||||||
}).isDisposed();
|
}).isDisposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getGiftGuide(String liveUid, HttpCallback<List<GiftGuideModel>> callback) {
|
public void getGiftGuide(String liveUid,String toUid ,HttpCallback<List<GiftGuideModel>> callback) {
|
||||||
API.get().pdLiveApi(mContext)
|
API.get().pdLiveApi(mContext)
|
||||||
.getGiftGuide(liveUid)
|
.getGiftGuide(liveUid,toUid)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Consumer<ResponseModel<List<GiftGuideModel>>>() {
|
.subscribe(new Consumer<ResponseModel<List<GiftGuideModel>>>() {
|
||||||
@ -2006,9 +2006,9 @@ public class LiveNetManager {
|
|||||||
}).isDisposed();
|
}).isDisposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getGiftGuideHistory(String liveUid, HttpCallback<List<GiftGuideModel>> callback) {
|
public void getGiftGuideHistory(String toUid,String liveUid, HttpCallback<List<GiftGuideModel>> callback) {
|
||||||
API.get().pdLiveApi(mContext)
|
API.get().pdLiveApi(mContext)
|
||||||
.getGiftGuideHistory(liveUid)
|
.getGiftGuideHistory(liveUid,toUid)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Consumer<ResponseModel<List<GiftGuideModel>>>() {
|
.subscribe(new Consumer<ResponseModel<List<GiftGuideModel>>>() {
|
||||||
|
@ -118,7 +118,7 @@ public class GiftWallActivity extends AbsActivity {
|
|||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
new XPopup.Builder(GiftWallActivity.this)
|
new XPopup.Builder(GiftWallActivity.this)
|
||||||
.enableDrag(false)
|
.enableDrag(false)
|
||||||
.asCustom(new CodexDialog(GiftWallActivity.this, mStream, mLiveUid, isLive))
|
.asCustom(new CodexDialog(GiftWallActivity.this, mStream, mLiveUid, mLiveUid,isLive))
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -17,7 +17,7 @@ import java.util.List;
|
|||||||
public class CodexAdapter extends RecyclerView.Adapter {
|
public class CodexAdapter extends RecyclerView.Adapter {
|
||||||
private List<GiftGuideModel> giftGuideModels = new ArrayList<>();
|
private List<GiftGuideModel> giftGuideModels = new ArrayList<>();
|
||||||
private boolean history;
|
private boolean history;
|
||||||
private String mStream, mLiveUid;
|
private String mStream, mLiveUid,toUid;
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
@ -28,7 +28,7 @@ public class CodexAdapter extends RecyclerView.Adapter {
|
|||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
CodexViewHolder codexViewHolder = (CodexViewHolder) holder;
|
CodexViewHolder codexViewHolder = (CodexViewHolder) holder;
|
||||||
codexViewHolder.showData(giftGuideModels.get(position), history,mStream,mLiveUid);
|
codexViewHolder.showData(giftGuideModels.get(position), history,mStream,mLiveUid,toUid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -36,10 +36,11 @@ public class CodexAdapter extends RecyclerView.Adapter {
|
|||||||
return giftGuideModels.size();
|
return giftGuideModels.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addAllData(List<GiftGuideModel> mGiftWall, boolean history, String mStream, String mLiveUid) {
|
public void addAllData(List<GiftGuideModel> mGiftWall, boolean history, String mStream, String mLiveUid, String toUid) {
|
||||||
this.history = history;
|
this.history = history;
|
||||||
this.mStream = mStream;
|
this.mStream = mStream;
|
||||||
this.mLiveUid = mLiveUid;
|
this.mLiveUid = mLiveUid;
|
||||||
|
this.toUid = toUid;
|
||||||
giftGuideModels.clear();
|
giftGuideModels.clear();
|
||||||
giftGuideModels.addAll(mGiftWall);
|
giftGuideModels.addAll(mGiftWall);
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
|
@ -24,16 +24,17 @@ import org.greenrobot.eventbus.ThreadMode;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class CodexDialog extends BottomPopupView {
|
public class CodexDialog extends BottomPopupView {
|
||||||
private String mStream, mLiveUid;
|
private String mStream, mLiveUid, toUid;
|
||||||
private RecyclerView liveCodex;
|
private RecyclerView liveCodex;
|
||||||
private CodexAdapter codexAdapter;
|
private CodexAdapter codexAdapter;
|
||||||
private boolean history;
|
private boolean history;
|
||||||
|
|
||||||
public CodexDialog(@NonNull Context context, String mStream, String mLiveUid, boolean history) {
|
public CodexDialog(@NonNull Context context, String mStream, String mLiveUid, String toUid, boolean history) {
|
||||||
super(context);
|
super(context);
|
||||||
this.mLiveUid = mLiveUid;
|
this.mLiveUid = mLiveUid;
|
||||||
this.mStream = mStream;
|
this.mStream = mStream;
|
||||||
this.history = history;
|
this.history = history;
|
||||||
|
this.toUid = toUid;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 返回自定义弹窗的布局
|
// 返回自定义弹窗的布局
|
||||||
@ -54,10 +55,10 @@ public class CodexDialog extends BottomPopupView {
|
|||||||
private void initDate() {
|
private void initDate() {
|
||||||
if (history) {
|
if (history) {
|
||||||
LiveNetManager.get(getContext()).
|
LiveNetManager.get(getContext()).
|
||||||
getGiftGuideHistory(mLiveUid, new HttpCallback<List<GiftGuideModel>>() {
|
getGiftGuideHistory(toUid,mLiveUid, new HttpCallback<List<GiftGuideModel>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<GiftGuideModel> data) {
|
public void onSuccess(List<GiftGuideModel> data) {
|
||||||
codexAdapter.addAllData(data,history,mStream,mLiveUid);
|
codexAdapter.addAllData(data,history,mStream,mLiveUid,toUid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -67,10 +68,10 @@ public class CodexDialog extends BottomPopupView {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
LiveNetManager.get(getContext()).
|
LiveNetManager.get(getContext()).
|
||||||
getGiftGuide(mLiveUid, new HttpCallback<List<GiftGuideModel>>() {
|
getGiftGuide(mLiveUid, toUid,new HttpCallback<List<GiftGuideModel>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<GiftGuideModel> data) {
|
public void onSuccess(List<GiftGuideModel> data) {
|
||||||
codexAdapter.addAllData(data,history,mStream,mLiveUid);
|
codexAdapter.addAllData(data,history,mStream,mLiveUid,toUid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -115,7 +115,7 @@ public class GiftWallDialog extends AbsDialogFragment {
|
|||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
new XPopup.Builder(getContext())
|
new XPopup.Builder(getContext())
|
||||||
.enableDrag(false)
|
.enableDrag(false)
|
||||||
.asCustom(new CodexDialog(getContext(), mStream, mLiveUid, false))
|
.asCustom(new CodexDialog(getContext(), mStream, mLiveUid, toUid,false))
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -690,11 +690,13 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (liveGiftModel.getType() == 7) {
|
if (liveGiftModel.getType() == 7) {
|
||||||
|
iconArrow.setVisibility(View.GONE);
|
||||||
showBlindProgress(liveGiftModel.getBlind_box_type());
|
showBlindProgress(liveGiftModel.getBlind_box_type());
|
||||||
} else {
|
} else {
|
||||||
blindBox.setVisibility(View.INVISIBLE);
|
blindBox.setVisibility(View.INVISIBLE);
|
||||||
mCount = DEFAULT_COUNT;
|
mCount = DEFAULT_COUNT;
|
||||||
giftNumber.setText(mCount);
|
giftNumber.setText(mCount);
|
||||||
|
iconArrow.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
liveGiftSend.setEnabled(true);
|
liveGiftSend.setEnabled(true);
|
||||||
giftNumberLayout.setVisibility(View.VISIBLE);
|
giftNumberLayout.setVisibility(View.VISIBLE);
|
||||||
|
@ -37,7 +37,7 @@ public class CodexViewHolder extends RecyclerView.ViewHolder {
|
|||||||
giftList.setAdapter(codexItemAdapter);
|
giftList.setAdapter(codexItemAdapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showData(GiftGuideModel giftGuideModel, boolean history, String mStream, String mLiveUid) {
|
public void showData(GiftGuideModel giftGuideModel, boolean history, String mStream, String mLiveUid, String toUid) {
|
||||||
StringBuffer stringBuffer = new StringBuffer();
|
StringBuffer stringBuffer = new StringBuffer();
|
||||||
stringBuffer.append(giftGuideModel.getIlluminateCount())
|
stringBuffer.append(giftGuideModel.getIlluminateCount())
|
||||||
.append("/")
|
.append("/")
|
||||||
@ -60,7 +60,7 @@ public class CodexViewHolder extends RecyclerView.ViewHolder {
|
|||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
new XPopup.Builder(itemView.getContext())
|
new XPopup.Builder(itemView.getContext())
|
||||||
.enableDrag(false)
|
.enableDrag(false)
|
||||||
.asCustom(new CodexDialog(itemView.getContext(), mStream, mLiveUid,true))
|
.asCustom(new CodexDialog(itemView.getContext(), mStream, mLiveUid,toUid,true))
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user