6.5.4礼物冠名
This commit is contained in:
parent
40e744a533
commit
44b95cb1c6
@ -1,5 +1,6 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -11,6 +12,7 @@ import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.WishModel;
|
||||
import com.yunbao.common.event.LiveNewWishListCloseEvent;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.DayWishItemViewHolder;
|
||||
import com.yunbao.common.views.LunarWishItemViewHolder;
|
||||
import com.yunbao.common.views.SeasonalWishItemViewHolder;
|
||||
@ -46,8 +48,20 @@ public class LiveNewWishAdapter extends RecyclerView.Adapter {
|
||||
Bus.get().post(new LiveNewWishListCloseEvent().setSeasonalWish(true));
|
||||
break;
|
||||
}
|
||||
boolean isAdd = false;
|
||||
for (int i = 0; i < wishList.size(); i++) {
|
||||
if (wishList.get(i)!=null){
|
||||
if (!TextUtils.isEmpty(wishList.get(i).getLid()) && !TextUtils.isEmpty(model.getLid())
|
||||
&& TextUtils.equals(wishList.get(i).getLid(), model.getLid())) {
|
||||
ToastUtil.show(R.string.too_many_gifts);
|
||||
isAdd = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (!isAdd) {
|
||||
wishList.add(0, model);
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
|
@ -119,6 +119,7 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
}
|
||||
if (wishList2.size() == 0) {
|
||||
Bus.get().post(new PopupViewDismissEvent());
|
||||
|
||||
} else if (wishList2.size() == 1) {
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new HintCustomPopup(getContext(),
|
||||
@ -146,20 +147,6 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
}
|
||||
});
|
||||
switch (type) {
|
||||
case 1:
|
||||
Bus.get().post(new LiveNewWishListCloseEvent().setDayWish(false));
|
||||
break;
|
||||
case 2:
|
||||
Bus.get().post(new LiveNewWishListCloseEvent().setZhouXin(false));
|
||||
break;
|
||||
case 3:
|
||||
Bus.get().post(new LiveNewWishListCloseEvent().setLunarWish(false));
|
||||
break;
|
||||
case 4:
|
||||
Bus.get().post(new LiveNewWishListCloseEvent().setSeasonalWish(false));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -185,6 +172,9 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
ToastUtil.show(R.string.net_error);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case 1:
|
||||
Bus.get().post(new LiveNewWishListCloseEvent().setDayWish(false));
|
||||
@ -200,7 +190,4 @@ public class LiveNewWishListFragment extends BaseFragment {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -167,6 +167,7 @@ public class LiveNewWishListPopup extends BottomPopupView {
|
||||
.setWishlistName(event.getModel().getName())
|
||||
.setWishlistIcon(event.getModel().getImg())
|
||||
.setWishlistNum("1")
|
||||
.setLid(event.getModel().getId())
|
||||
.setLuid("" + IMLoginManager.get(mContext).getUserInfo().getId())
|
||||
.setWishlistProgress("0")
|
||||
.setPrice(Integer.parseInt(event.getModel().getPrice()))
|
||||
@ -334,7 +335,7 @@ public class LiveNewWishListPopup extends BottomPopupView {
|
||||
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
ToastUtil.show(data);
|
||||
ToastUtil.show("修改成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -39,7 +39,10 @@
|
||||
android:layout_width="117dp"
|
||||
android:layout_height="31dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@drawable/background_wish_replacement"
|
||||
android:gravity="center"
|
||||
android:text="@string/replacement_wish_day"
|
||||
|
@ -1311,6 +1311,7 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="sett_rigger">"At least 2 types of gifts can be set to trigger the wish list special effect gift. "</string>
|
||||
<string name="cancel_ca">cancel</string>
|
||||
<string name="settings_ser">settings</string>
|
||||
<string name="too_many_gifts">Too many gifts</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
@ -1307,4 +1307,5 @@
|
||||
<string name="sett_rigger">最低设置2种类型礼物才能触发心愿单特效礼物。</string>
|
||||
<string name="cancel_ca">不再设置</string>
|
||||
<string name="settings_ser">去设置</string>
|
||||
<string name="too_many_gifts">重複添加禮物</string>
|
||||
</resources>
|
||||
|
@ -1306,4 +1306,5 @@
|
||||
<string name="sett_rigger">最低设置2种类型礼物才能触发心愿单特效礼物。</string>
|
||||
<string name="cancel_ca">不再设置</string>
|
||||
<string name="settings_ser">去设置</string>
|
||||
<string name="too_many_gifts">重複添加禮物</string>
|
||||
</resources>
|
||||
|
@ -1306,6 +1306,7 @@
|
||||
<string name="sett_rigger">最低设置2种类型礼物才能触发心愿单特效礼物。</string>
|
||||
<string name="cancel_ca">不再设置</string>
|
||||
<string name="settings_ser">去设置</string>
|
||||
<string name="too_many_gifts">重複添加禮物</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
@ -1312,5 +1312,6 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="sett_rigger">At least 2 types of gifts can be set to trigger the wish list special effect gift. </string>
|
||||
<string name="cancel_ca">cancel</string>
|
||||
<string name="settings_ser">settings</string>
|
||||
<string name="too_many_gifts">Too many gifts</string>
|
||||
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user