埋点配置
This commit is contained in:
parent
93aa8e55e5
commit
82fd35305a
@ -66,6 +66,28 @@ public class LiveGiftBean {
|
|||||||
private String namingCoin;
|
private String namingCoin;
|
||||||
@JSONField(name = "naming_user_coin")
|
@JSONField(name = "naming_user_coin")
|
||||||
private String namingUserCoin;
|
private String namingUserCoin;
|
||||||
|
@JSONField(name = "blind_box_ticket")
|
||||||
|
private int blindBoxTicket;
|
||||||
|
@JSONField(name = "blind_box_ticket_id")
|
||||||
|
private int blindBoxTicketId;
|
||||||
|
|
||||||
|
public int getBlindBoxTicketId() {
|
||||||
|
return blindBoxTicketId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveGiftBean setBlindBoxTicketId(int blindBoxTicketId) {
|
||||||
|
this.blindBoxTicketId = blindBoxTicketId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBlindBoxTicket() {
|
||||||
|
return blindBoxTicket;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveGiftBean setBlindBoxTicket(int blindBoxTicket) {
|
||||||
|
this.blindBoxTicket = blindBoxTicket;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getNamingUserCoin() {
|
public String getNamingUserCoin() {
|
||||||
return namingUserCoin;
|
return namingUserCoin;
|
||||||
@ -202,7 +224,7 @@ public class LiveGiftBean {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int fansGiftLevel=0;//粉丝团礼物等级要求
|
private int fansGiftLevel = 0;//粉丝团礼物等级要求
|
||||||
|
|
||||||
public int getFansGiftLevel() {
|
public int getFansGiftLevel() {
|
||||||
return fansGiftLevel;
|
return fansGiftLevel;
|
||||||
|
@ -6,10 +6,6 @@ import com.lzy.okgo.request.GetRequest;
|
|||||||
import com.lzy.okgo.request.PostRequest;
|
import com.lzy.okgo.request.PostRequest;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.CommonAppContext;
|
import com.yunbao.common.CommonAppContext;
|
||||||
import com.yunbao.common.http.CommonHttpUtil;
|
|
||||||
import com.yunbao.common.http.HttpCallback;
|
|
||||||
import com.yunbao.common.http.HttpClient;
|
|
||||||
import com.yunbao.common.http.JsonBean;
|
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
import com.yunbao.common.utils.MD5Util;
|
import com.yunbao.common.utils.MD5Util;
|
||||||
@ -292,6 +288,7 @@ public class LiveHttpUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 主播或管理员禁言
|
* 主播或管理员禁言
|
||||||
|
*
|
||||||
* @param time 禁言时间 (分)
|
* @param time 禁言时间 (分)
|
||||||
*/
|
*/
|
||||||
public static void setShutUp(String liveUid, String stream, int type, String touid, String time, HttpCallback callback) {
|
public static void setShutUp(String liveUid, String stream, int type, String touid, String time, HttpCallback callback) {
|
||||||
@ -619,17 +616,19 @@ public class LiveHttpUtil {
|
|||||||
* 观众给主播送礼物
|
* 观众给主播送礼物
|
||||||
*/
|
*/
|
||||||
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, HttpCallback callback) {
|
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, HttpCallback callback) {
|
||||||
sendGift(by, liveUid, stream, giftId, giftCount, 0, false,callback);
|
sendGift(by, liveUid, stream, giftId, giftCount, 0, false, callback);
|
||||||
}
|
}
|
||||||
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, HttpCallback callback) {
|
|
||||||
sendGift(by, liveUid, stream, giftId, giftCount, isContactGift, false,callback);
|
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, HttpCallback callback) {
|
||||||
|
sendGift(by, liveUid, stream, giftId, giftCount, isContactGift, false, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 观众给主播送礼物
|
* 观众给主播送礼物
|
||||||
*
|
*
|
||||||
* @param isContactGift 是否为联系方式礼物
|
* @param isContactGift 是否为联系方式礼物
|
||||||
*/
|
*/
|
||||||
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, boolean isFansGroupGift,HttpCallback callback) {
|
public static void sendGift(String by, String liveUid, String stream, int giftId, String giftCount, int isContactGift, boolean isFansGroupGift, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Live.sendGift", LiveHttpConsts.SEND_GIFT)
|
HttpClient.getInstance().get("Live.sendGift", LiveHttpConsts.SEND_GIFT)
|
||||||
.params("liveuid", liveUid)
|
.params("liveuid", liveUid)
|
||||||
.params("stream", stream)
|
.params("stream", stream)
|
||||||
@ -637,7 +636,20 @@ public class LiveHttpUtil {
|
|||||||
.params("isContactGift", isContactGift)
|
.params("isContactGift", isContactGift)
|
||||||
.params("giftcount", giftCount)
|
.params("giftcount", giftCount)
|
||||||
.params("isprank", by)
|
.params("isprank", by)
|
||||||
.params("fans_exclusive_pack",isFansGroupGift?"1":"0")
|
.params("fans_exclusive_pack", isFansGroupGift ? "1" : "0")
|
||||||
|
.params("appVersion", CommonAppConfig.getInstance().getVersion())
|
||||||
|
.execute(callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void sendBlindBoxTicket(String by, String liveUid, String stream, int giftId, HttpCallback callback) {
|
||||||
|
HttpClient.getInstance().get("Live.sendBlindBoxTicket", LiveHttpConsts.SEND_GIFT)
|
||||||
|
.params("liveuid", liveUid)
|
||||||
|
.params("stream", stream)
|
||||||
|
.params("giftid", giftId)
|
||||||
|
.params("isContactGift", 0)
|
||||||
|
.params("giftcount", "1")
|
||||||
|
.params("isprank", by)
|
||||||
|
.params("fans_exclusive_pack", "0")
|
||||||
.params("appVersion", CommonAppConfig.getInstance().getVersion())
|
.params("appVersion", CommonAppConfig.getInstance().getVersion())
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
@ -1313,5 +1313,7 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="cancel_ca">cancel</string>
|
<string name="cancel_ca">cancel</string>
|
||||||
<string name="settings_ser">settings</string>
|
<string name="settings_ser">settings</string>
|
||||||
<string name="too_many_gifts">Too many gifts</string>
|
<string name="too_many_gifts">Too many gifts</string>
|
||||||
|
<string name="trial_coupon">是否使用試用劵</string>
|
||||||
|
<string name="use_diamonds">使用鑽石</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -66,4 +66,14 @@ public class FrameGiftAdapter extends RecyclerView.Adapter {
|
|||||||
public int getItemCount() {
|
public int getItemCount() {
|
||||||
return giftJson.size();
|
return giftJson.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void refreshWrapListAfterSend(LiveGiftBean model) {
|
||||||
|
for (int i = 0; i < giftJson.size(); i++) {
|
||||||
|
if (giftJson.get(i).getId() == model.getId()) {
|
||||||
|
int giftNum = giftJson.get(i).getBlindBoxTicket();
|
||||||
|
giftJson.get(i).setBlindBoxTicket(giftNum - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,15 +34,20 @@ public class CoinModel extends BaseModel {
|
|||||||
|
|
||||||
public String getCoin() {
|
public String getCoin() {
|
||||||
long coinMoney = Long.parseLong(coin);
|
long coinMoney = Long.parseLong(coin);
|
||||||
|
String coinStr = coin;
|
||||||
if (999999999 < coinMoney && coinMoney <= 999999999999L) {
|
if (999999999 < coinMoney && coinMoney <= 999999999999L) {
|
||||||
coin = coin.substring(0, coin.length() - 3);
|
coinStr = coinStr.substring(0, coinStr.length() - 3);
|
||||||
coin = coin + "k";
|
coinStr = coinStr + "k";
|
||||||
}
|
}
|
||||||
if (999999999999L < coinMoney && coinMoney <= 999999999999999L) {
|
if (999999999999L < coinMoney && coinMoney <= 999999999999999L) {
|
||||||
coin = coin.substring(0, coin.length() - 6);
|
coinStr = coinStr.substring(0, coinStr.length() - 6);
|
||||||
coin = coin + "M";
|
coinStr = coinStr + "M";
|
||||||
}
|
}
|
||||||
return coin;
|
return coinStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCoinLong() {
|
||||||
|
return Long.parseLong(coin);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CoinModel setCoin(String coin) {
|
public CoinModel setCoin(String coin) {
|
||||||
|
@ -230,7 +230,36 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
MobclickAgent.onEvent(mContext, "gif_list_seed_gif", "用户送礼物");
|
MobclickAgent.onEvent(mContext, "gif_list_seed_gif", "用户送礼物");
|
||||||
sendGiftHandler.post(sendGiftRunnble);
|
|
||||||
|
if (liveGiftModel != null && liveGiftModel.getBlindBoxTicket() > 0) {
|
||||||
|
BigDecimal needcoin = new BigDecimal(liveGiftModel.getPrice()).multiply(new BigDecimal(mCount));
|
||||||
|
|
||||||
|
if (needcoin.longValue() > diamond) {
|
||||||
|
|
||||||
|
sendBlindBoxTicket();
|
||||||
|
} else {
|
||||||
|
new DialogUitl.Builder(mContext)
|
||||||
|
.setView(R.layout.dialog_live_unfollow)
|
||||||
|
.setConfirmString(mContext.getString(R.string.aristocrat_determine))
|
||||||
|
.setCancelString(mContext.getString(R.string.use_diamonds))
|
||||||
|
.setContent(mContext.getString(R.string.trial_coupon))
|
||||||
|
.setClickCallback(new DialogUitl.SimpleCallback2() {
|
||||||
|
@Override
|
||||||
|
public void onCancelClick() {
|
||||||
|
sendGiftHandler.post(sendGiftRunnble);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
|
sendBlindBoxTicket();
|
||||||
|
}
|
||||||
|
}).setCancelable(true).build().show();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
sendGiftHandler.post(sendGiftRunnble);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -453,6 +482,8 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
|||||||
/**
|
/**
|
||||||
* 获取砖石和金豆余额
|
* 获取砖石和金豆余额
|
||||||
*/
|
*/
|
||||||
|
long diamond = 0;
|
||||||
|
|
||||||
private void getCoin() {
|
private void getCoin() {
|
||||||
LiveHttpUtil.getCoin(new HttpCallback() {
|
LiveHttpUtil.getCoin(new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
@ -462,6 +493,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
|||||||
CoinModel coinModel = GsonUtils.fromJson(info[0], CoinModel.class);
|
CoinModel coinModel = GsonUtils.fromJson(info[0], CoinModel.class);
|
||||||
goldText.setText(coinModel.getGold());
|
goldText.setText(coinModel.getGold());
|
||||||
diamondText.setText(coinModel.getCoin());
|
diamondText.setText(coinModel.getCoin());
|
||||||
|
diamond = coinModel.getCoinLong();
|
||||||
lvStr.setText("Lv." + coinModel.getUserLevel());
|
lvStr.setText("Lv." + coinModel.getUserLevel());
|
||||||
|
|
||||||
findViewById(R.id.red_point).setVisibility((!TextUtils.isEmpty(coinModel.getUsersPackRedDot())) &&
|
findViewById(R.id.red_point).setVisibility((!TextUtils.isEmpty(coinModel.getUsersPackRedDot())) &&
|
||||||
@ -528,10 +560,66 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
|||||||
private Runnable sendGiftRunnble = new Runnable() {
|
private Runnable sendGiftRunnble = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
sendGift();
|
if (isWrap && liveGiftModel.getType() == 7) {
|
||||||
|
sendBlindBoxTicket();
|
||||||
|
} else {
|
||||||
|
sendGift();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//使用优惠券
|
||||||
|
public void sendBlindBoxTicket() {
|
||||||
|
if (TextUtils.isEmpty(mLiveUid) ||
|
||||||
|
TextUtils.isEmpty(mStream) ||
|
||||||
|
liveGiftModel == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
LiveHttpUtil.sendBlindBoxTicket((by != null ? "1" : "0"),
|
||||||
|
mLiveUid,
|
||||||
|
mStream,
|
||||||
|
isWrap ? liveGiftModel.getId() : liveGiftModel.getBlindBoxTicketId(), new HttpCallback() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
|
if (code == 0) {
|
||||||
|
if (liveGiftModel.getSwf().contains("svga")) {
|
||||||
|
dismiss();
|
||||||
|
}
|
||||||
|
if (info.length > 0) {
|
||||||
|
JSONObject obj = JSON.parseObject(info[0]);
|
||||||
|
String coin = obj.getString("coin");
|
||||||
|
String goldCoin = obj.getString("gold");
|
||||||
|
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||||
|
if (u != null) {
|
||||||
|
u.setLevel(obj.getIntValue("level"));
|
||||||
|
//送礼物后更新粉丝徽章等级
|
||||||
|
u.setMedalLevel(obj.getIntValue("medal_level"));
|
||||||
|
u.setMedalName(obj.getString("medal_name"));
|
||||||
|
u.setCoin(coin);
|
||||||
|
}
|
||||||
|
if (diamondText != null) {
|
||||||
|
diamondText.setText(coin);
|
||||||
|
}
|
||||||
|
if (goldText != null) {
|
||||||
|
goldText.setText(goldCoin);
|
||||||
|
}
|
||||||
|
if (!isWrap) {
|
||||||
|
liveGiftModel.setBlindBoxTicket(liveGiftModel.getBlindBoxTicket() - 1);
|
||||||
|
}
|
||||||
|
isGetNewWrap = true;
|
||||||
|
if (isWrap) {
|
||||||
|
Bus.get().post(new LiveParcelItemRefreshEvent().setLiveGiftModel(liveGiftModel));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ToastUtil.show(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 赠送礼物
|
* 赠送礼物
|
||||||
*/
|
*/
|
||||||
@ -655,39 +743,45 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
|||||||
lianSongHandler.removeCallbacks(lianSongRunnable);
|
lianSongHandler.removeCallbacks(lianSongRunnable);
|
||||||
mShowLianBtn = false;
|
mShowLianBtn = false;
|
||||||
getCoin();
|
getCoin();
|
||||||
|
|
||||||
LiveNetManager.get(mContext)
|
LiveNetManager.get(mContext)
|
||||||
.getGiftNamingInfo(liveGiftModel.getId() + "", new com.yunbao.common.http.base.HttpCallback<GiftNamingInfoModel>() {
|
.getGiftNamingInfo(liveGiftModel.getId() + "", new com.yunbao.common.http.base.HttpCallback<GiftNamingInfoModel>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(GiftNamingInfoModel data) {
|
public void onSuccess(GiftNamingInfoModel data) {
|
||||||
liveGiftModel = JSONObject.parseObject(GsonUtils.toJson(data), LiveGiftBean.class);
|
if (TextUtils.equals(data.getNamingStatus(), "1")) {
|
||||||
if (!TextUtils.isEmpty(liveGiftModel.getNamingLiveuid()) &&
|
liveGiftModel = JSONObject.parseObject(GsonUtils.toJson(data), LiveGiftBean.class);
|
||||||
!TextUtils.isEmpty(liveGiftModel.getNamingUid()) &&
|
if (!TextUtils.isEmpty(liveGiftModel.getNamingLiveuid()) &&
|
||||||
!TextUtils.equals(liveGiftModel.getNamingLiveuid(), "0") &&
|
!TextUtils.isEmpty(liveGiftModel.getNamingUid()) &&
|
||||||
!TextUtils.equals(liveGiftModel.getNamingUid(), "0")) {
|
!TextUtils.equals(liveGiftModel.getNamingLiveuid(), "0") &&
|
||||||
namingLayout.setVisibility(View.VISIBLE);
|
!TextUtils.equals(liveGiftModel.getNamingUid(), "0")) {
|
||||||
ImgLoader.display(mContext, liveGiftModel.getNamingLiveAvatar(), namingAvatar);
|
namingLayout.setVisibility(View.VISIBLE);
|
||||||
StringBuffer namingNameText = new StringBuffer();
|
ImgLoader.display(mContext, liveGiftModel.getNamingLiveAvatar(), namingAvatar);
|
||||||
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
StringBuffer namingNameText = new StringBuffer();
|
||||||
namingNameText.append("获取冠名:")
|
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||||
.append(liveGiftModel.getNamingUserCoin())
|
namingNameText.append("获取冠名:")
|
||||||
.append(" ");
|
.append(liveGiftModel.getNamingUserCoin())
|
||||||
|
.append(" ");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
namingNameText.append("Get title: ")
|
||||||
|
.append(liveGiftModel.getNamingUserCoin())
|
||||||
|
.append(" ");
|
||||||
|
}
|
||||||
|
namingNameText.append(mContext.getText(com.yunbao.live.R.string.title_anchor))
|
||||||
|
.append(liveGiftModel.getNamingLiveName())
|
||||||
|
.append(" ")
|
||||||
|
.append(mContext.getText(com.yunbao.live.R.string.the_title_financier))
|
||||||
|
.append(" ")
|
||||||
|
.append(liveGiftModel.getNamingUserName());
|
||||||
|
namingName.setText(namingNameText.toString());
|
||||||
} else {
|
} else {
|
||||||
namingNameText.append("Get title: ")
|
namingLayout.setVisibility(View.GONE);
|
||||||
.append(liveGiftModel.getNamingUserCoin())
|
|
||||||
.append(" ");
|
|
||||||
}
|
}
|
||||||
namingNameText.append(mContext.getText(com.yunbao.live.R.string.title_anchor))
|
|
||||||
.append(liveGiftModel.getNamingLiveName())
|
|
||||||
.append(" ")
|
|
||||||
.append(mContext.getText(com.yunbao.live.R.string.the_title_financier))
|
|
||||||
.append(" ")
|
|
||||||
.append(liveGiftModel.getNamingUserName());
|
|
||||||
namingName.setText(namingNameText.toString());
|
|
||||||
} else {
|
} else {
|
||||||
namingLayout.setVisibility(View.GONE);
|
namingLayout.setVisibility(View.GONE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -800,7 +894,7 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
|||||||
if (!TextUtils.isEmpty(liveGiftModel.getOperateImage())) {
|
if (!TextUtils.isEmpty(liveGiftModel.getOperateImage())) {
|
||||||
operateImage.setVisibility(View.VISIBLE);
|
operateImage.setVisibility(View.VISIBLE);
|
||||||
ImgLoader.display(getContext(), liveGiftModel.getOperateImage(), operateImage);
|
ImgLoader.display(getContext(), liveGiftModel.getOperateImage(), operateImage);
|
||||||
}else {
|
} else {
|
||||||
operateImage.setVisibility(View.GONE);
|
operateImage.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1185,12 +1279,15 @@ public class LiveGiftPopup extends AbsDialogFragment {
|
|||||||
if (goldText != null) {
|
if (goldText != null) {
|
||||||
goldText.setText(goldCoin);
|
goldText.setText(goldCoin);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mGiftBean.getSwf().contains("svga")) {
|
if (!mGiftBean.getSwf().contains("svga")) {
|
||||||
showLianBtn();
|
showLianBtn();
|
||||||
}
|
}
|
||||||
if (mGiftBean.getType() == 7) {
|
if (mGiftBean.getType() == 7) {
|
||||||
showLianBtn();
|
showLianBtn();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// //刷新包裹列表wrap_gift_num -1:表示数量没有变化
|
// //刷新包裹列表wrap_gift_num -1:表示数量没有变化
|
||||||
// mObjGiftSendback = obj;
|
// mObjGiftSendback = obj;
|
||||||
isGetNewWrap = true;
|
isGetNewWrap = true;
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.yunbao.live.event;
|
||||||
|
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
import com.yunbao.common.bean.LiveGiftBean;
|
||||||
|
|
||||||
|
public class LiveGiftItemRefreshEvent extends BaseModel {
|
||||||
|
private LiveGiftBean liveGiftModel;
|
||||||
|
|
||||||
|
public LiveGiftBean getLiveGiftModel() {
|
||||||
|
return liveGiftModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveGiftItemRefreshEvent setLiveGiftModel(LiveGiftBean liveGiftModel) {
|
||||||
|
this.liveGiftModel = liveGiftModel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
@ -19,6 +19,11 @@ import com.yunbao.common.bean.LiveGiftBean;
|
|||||||
import com.yunbao.common.fragment.BaseFragment;
|
import com.yunbao.common.fragment.BaseFragment;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.adapter.LiveGiftFragmentPagerAdapter;
|
import com.yunbao.live.adapter.LiveGiftFragmentPagerAdapter;
|
||||||
|
import com.yunbao.live.event.LiveGiftItemRefreshEvent;
|
||||||
|
import com.yunbao.live.event.LiveParcelItemRefreshEvent;
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -148,4 +153,6 @@ public class LiveGiftFragment extends BaseFragment {
|
|||||||
liveGiftFragment.setArguments(bundle);
|
liveGiftFragment.setArguments(bundle);
|
||||||
return liveGiftFragment;
|
return liveGiftFragment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ import com.yunbao.common.utils.Bus;
|
|||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.adapter.FrameGiftAdapter;
|
import com.yunbao.live.adapter.FrameGiftAdapter;
|
||||||
import com.yunbao.live.event.LiveGiftItemEvent;
|
import com.yunbao.live.event.LiveGiftItemEvent;
|
||||||
|
import com.yunbao.live.event.LiveGiftItemRefreshEvent;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
@ -79,4 +80,8 @@ public class LiveGiftItemFragment extends BaseFragment {
|
|||||||
public void onLiveGiftItemEvent(LiveGiftItemEvent event) {
|
public void onLiveGiftItemEvent(LiveGiftItemEvent event) {
|
||||||
frameGiftAdapter.giftSelect(event.getLiveGiftModel());
|
frameGiftAdapter.giftSelect(event.getLiveGiftModel());
|
||||||
}
|
}
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
public void onLiveGiftItemRefreshEvent(LiveGiftItemRefreshEvent event) {
|
||||||
|
frameGiftAdapter.refreshWrapListAfterSend(event.getLiveGiftModel());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user