6.5.4礼物冠名

This commit is contained in:
18401019693 2023-08-08 16:08:43 +08:00
parent 20c00e2896
commit af17c85366
2 changed files with 14 additions and 21 deletions

View File

@ -66,7 +66,7 @@ public class LiveNewWishListFragment extends BaseFragment {
ViewClicksAntiShake.clicksAntiShake(tvDone, new ViewClicksAntiShake.ViewClicksCallBack() { ViewClicksAntiShake.clicksAntiShake(tvDone, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override @Override
public void onViewClicks() { public void onViewClicks() {
saveWish(); saveWish( );
} }
}); });
@ -106,7 +106,7 @@ public class LiveNewWishListFragment extends BaseFragment {
liveNewWishAdapter.addData(wishList, type); liveNewWishAdapter.addData(wishList, type);
} }
public void saveWish() { public void saveWish( ) {
List<WishModel> wishList = liveNewWishAdapter.getWishList(); List<WishModel> wishList = liveNewWishAdapter.getWishList();
List<WishModel2> wishList2 = new ArrayList<>(); List<WishModel2> wishList2 = new ArrayList<>();
Gson gson = new Gson(); Gson gson = new Gson();
@ -132,12 +132,10 @@ public class LiveNewWishListFragment extends BaseFragment {
break; break;
} }
if (wishList2.size() == 0) { if (wishList2.size() == 0) {
Bus.get().post(new PopupViewDismissEvent());
LiveNetManager.get(getContext()). LiveNetManager.get(getContext()).
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() { setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
@Override @Override
public void onSuccess(String data) { public void onSuccess(String data) {
Bus.get().post(new PopupViewDismissEvent());
ToastUtil.show("修改成功"); ToastUtil.show("修改成功");
} }
@ -151,12 +149,17 @@ public class LiveNewWishListFragment extends BaseFragment {
.asCustom(new HintCustomPopup(getContext(), .asCustom(new HintCustomPopup(getContext(),
getContext().getString(R.string.dialog_tip), getContext().getString(R.string.dialog_tip),
getContext().getString(R.string.sett_rigger)) getContext().getString(R.string.sett_rigger))
.setLiveOpenOk(getContext().getString(R.string.cancel_ca)) .setLiveOpenOk(getContext().getString(R.string.settings_ser))
.setLiveOpenCancel(getContext().getString(R.string.settings_ser)) .setLiveOpenCancel(getContext().getString(R.string.cancel_ca))
.setCallBack(new HintCustomPopup.HintCustomCallBack() { .setCallBack(new HintCustomPopup.HintCustomCallBack() {
@Override @Override
public void onSure() { public void onSure() {
}
@Override
public void onCancel() {
if (wishList2.size() > 10) { if (wishList2.size() > 10) {
ToastUtil.show(R.string.must_hint); ToastUtil.show(R.string.must_hint);
return; return;
@ -165,7 +168,6 @@ public class LiveNewWishListFragment extends BaseFragment {
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() { setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
@Override @Override
public void onSuccess(String data) { public void onSuccess(String data) {
Bus.get().post(new PopupViewDismissEvent());
ToastUtil.show("修改成功"); ToastUtil.show("修改成功");
} }
@ -175,14 +177,8 @@ public class LiveNewWishListFragment extends BaseFragment {
} }
}); });
} }
@Override
public void onCancel() {
}
})).show(); })).show();
} else { } else {
Bus.get().post(new PopupViewDismissEvent());
if (wishList2.size() > 10) { if (wishList2.size() > 10) {
ToastUtil.show(R.string.must_hint); ToastUtil.show(R.string.must_hint);
return; return;
@ -191,7 +187,6 @@ public class LiveNewWishListFragment extends BaseFragment {
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() { setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
@Override @Override
public void onSuccess(String data) { public void onSuccess(String data) {
Bus.get().post(new PopupViewDismissEvent());
ToastUtil.show("修改成功"); ToastUtil.show("修改成功");
} }

View File

@ -110,17 +110,15 @@ public class LiveNewWishListPopup extends BottomPopupView {
public void onSure() { public void onSure() {
hintCustomPopup = null; hintCustomPopup = null;
if (dayWish) { if (dayWish) {
dayWishFragment.saveWish(); dayWishFragment.saveWish( );
} else if (zhouXin) { } else if (zhouXin) {
zhouXinFragment.saveWish(); zhouXinFragment.saveWish( );
} else if (lunarWish) { } else if (lunarWish) {
lunarWishFragment.saveWish(); lunarWishFragment.saveWish( );
} else if (seasonalWish) { } else if (seasonalWish) {
seasonalWishFragment.saveWish(); seasonalWishFragment.saveWish( );
}
if (isDismiss) {
dismiss();
} }
} }
@Override @Override