6.5.4礼物冠名
This commit is contained in:
@@ -248,7 +248,10 @@ public class WebViewActivity extends AbsActivity {
|
||||
mValueCallback2 = null;
|
||||
}
|
||||
|
||||
public static void forward(Context context, String url, boolean addArgs) {
|
||||
private static boolean mIsLive = false;
|
||||
|
||||
public static void forward(Context context, String url, boolean addArgs, boolean isLive) {
|
||||
mIsLive = isLive;
|
||||
if (Constants.LoginKefu) {
|
||||
if (addArgs) {
|
||||
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken();
|
||||
@@ -259,8 +262,8 @@ public class WebViewActivity extends AbsActivity {
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void forward(Context context, String url) {
|
||||
forward(context, url, true);
|
||||
public static void forward(Context context, String url,boolean isLive) {
|
||||
forward(context, url, true, isLive);
|
||||
}
|
||||
|
||||
|
||||
@@ -405,9 +408,9 @@ public class WebViewActivity extends AbsActivity {
|
||||
MicStatusManager.getInstance().showDownMicDialog(mContext);
|
||||
return;
|
||||
}
|
||||
if (!"".endsWith(Constants.mStream)) {
|
||||
if (mIsLive) {
|
||||
finish();
|
||||
if(MicStatusManager.getInstance().isMic(liveUid)){
|
||||
if (MicStatusManager.getInstance().isMic(liveUid)) {
|
||||
MicStatusManager.getInstance().showDownMicDialog(mContext);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,16 @@ public class GiftWallItemEvent extends BaseModel {
|
||||
private GiftWallModel giftWallModel;
|
||||
private boolean unlit;
|
||||
|
||||
private boolean csb;
|
||||
|
||||
public boolean isCsb() {
|
||||
return csb;
|
||||
}
|
||||
|
||||
public GiftWallItemEvent setCsb(boolean csb) {
|
||||
this.csb = csb;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GiftWallModel getGiftWallModel() {
|
||||
return giftWallModel;
|
||||
|
||||
@@ -889,7 +889,8 @@ public interface PDLiveApi {
|
||||
@GET("/api/public/?service=Gift.giftDetail")
|
||||
Observable<ResponseModel<GiftWallGiftDetail>> giftDetail(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("gift_id") String giftId
|
||||
@Query("gift_id") String giftId,
|
||||
@Query("to_uid") String toUid
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -1929,9 +1929,9 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void giftDetail(String liveUid, String giftId, HttpCallback<GiftWallGiftDetail> callback) {
|
||||
public void giftDetail(String liveUid, String giftId, String toUid, HttpCallback<GiftWallGiftDetail> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.giftDetail(liveUid, giftId)
|
||||
.giftDetail(liveUid, giftId,toUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<GiftWallGiftDetail>>() {
|
||||
|
||||
@@ -239,7 +239,7 @@ public class PayPresenter {
|
||||
|
||||
public void open(String url){
|
||||
//支付时内部跳转 false要添加
|
||||
WebViewActivity.forward(mActivity,url,false);
|
||||
WebViewActivity.forward(mActivity,url,false,false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -25,14 +25,14 @@ public class GiftAlreadyWallViewHolder extends RecyclerView.ViewHolder {
|
||||
giftNumber = itemView.findViewById(R.id.gift_number);
|
||||
}
|
||||
|
||||
public void showData(GiftWallModel giftWallModel,boolean sbWy) {
|
||||
public void showData(GiftWallModel giftWallModel, boolean sbWy) {
|
||||
giftTitle.setText(giftWallModel.getGiftname());
|
||||
giftNumber.setText("*" + giftWallModel.getGiftCountNumber());
|
||||
ImgLoader.display(itemView.getContext(), giftWallModel.getGifticon(), giftImg);
|
||||
ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
Bus.get().post(new GiftWallItemEvent().setGiftWallModel(giftWallModel).setUnlit(true));
|
||||
Bus.get().post(new GiftWallItemEvent().setGiftWallModel(giftWallModel).setUnlit(true).setCsb(true));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class GiftWithoutWallViewHolder extends RecyclerView.ViewHolder {
|
||||
ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
Bus.get().post(new GiftWallItemEvent().setGiftWallModel(giftWallModel).setUnlit(false));
|
||||
Bus.get().post(new GiftWallItemEvent().setGiftWallModel(giftWallModel).setUnlit(false).setCsb(false));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -19,12 +19,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="9dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/instant_light"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/gift_number"
|
||||
android:gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="9dp"
|
||||
android:text="@string/instant_light"
|
||||
android:gravity="center"
|
||||
android:textColor="#54618F"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user