6.5.4礼物冠名

This commit is contained in:
18401019693 2023-08-08 11:37:19 +08:00
parent 994bd2a3aa
commit 82ccd2d89c
6 changed files with 68 additions and 3 deletions

View File

@ -22,6 +22,7 @@ import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.views.HintCustomPopup;
import com.yunbao.common.views.LiveNewWishGiftPopup; import com.yunbao.common.views.LiveNewWishGiftPopup;
import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.common.views.weight.ViewClicksAntiShake;
@ -66,7 +67,7 @@ public class LiveNewWishListFragment extends BaseFragment {
@Override @Override
public void onViewClicks() { public void onViewClicks() {
saveWish(); saveWish();
Bus.get().post(new PopupViewDismissEvent());
} }
}); });
} }
@ -118,7 +119,56 @@ public class LiveNewWishListFragment extends BaseFragment {
} }
if (wishList2.size() == 0) { if (wishList2.size() == 0) {
Bus.get().post(new PopupViewDismissEvent()); Bus.get().post(new PopupViewDismissEvent());
} else if (wishList2.size() == 1) {
new XPopup.Builder(getContext())
.asCustom(new HintCustomPopup(getContext(),
getContext().getString(R.string.dialog_tip),
getContext().getString(R.string.sett_rigger))
.setLiveOpenOk(getContext().getString(R.string.cancel_ca))
.setLiveOpenCancel(getContext().getString(R.string.settings_ser))
.setCallBack(new HintCustomPopup.HintCustomCallBack() {
@Override
public void onSure() {
if (wishList2.size() > 10) {
ToastUtil.show(R.string.must_hint);
return;
}
LiveNetManager.get(getContext()).
setWishlistV2(type, gson.toJson(wishList2), new HttpCallback<String>() {
@Override
public void onSuccess(String data) {
Bus.get().post(new PopupViewDismissEvent());
}
@Override
public void onError(String error) {
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
public void onCancel() {
}
})).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;

View File

@ -1308,6 +1308,9 @@ Limited ride And limited avatar frame</string>
<string name="the__gifts_in_the_studio">Please make gifts in the studio</string> <string name="the__gifts_in_the_studio">Please make gifts in the studio</string>
<string name="been_sent">Been sent out</string> <string name="been_sent">Been sent out</string>
<string name="been_sent_must">Send out</string> <string name="been_sent_must">Send out</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>
</resources> </resources>

View File

@ -1304,4 +1304,7 @@
<string name="the__gifts_in_the_studio">请在直播间内进行送礼</string> <string name="the__gifts_in_the_studio">请在直播间内进行送礼</string>
<string name="been_sent">已送出</string> <string name="been_sent">已送出</string>
<string name="been_sent_must">立即送出</string> <string name="been_sent_must">立即送出</string>
<string name="sett_rigger">最低设置2种类型礼物才能触发心愿单特效礼物。</string>
<string name="cancel_ca">不再设置</string>
<string name="settings_ser">去设置</string>
</resources> </resources>

View File

@ -1303,4 +1303,7 @@
<string name="the__gifts_in_the_studio">请在直播间内进行送礼</string> <string name="the__gifts_in_the_studio">请在直播间内进行送礼</string>
<string name="been_sent">已送出</string> <string name="been_sent">已送出</string>
<string name="been_sent_must">立即送出</string> <string name="been_sent_must">立即送出</string>
<string name="sett_rigger">最低设置2种类型礼物才能触发心愿单特效礼物。</string>
<string name="cancel_ca">不再设置</string>
<string name="settings_ser">去设置</string>
</resources> </resources>

View File

@ -1303,6 +1303,9 @@
<string name="the__gifts_in_the_studio">请在直播间内进行送礼</string> <string name="the__gifts_in_the_studio">请在直播间内进行送礼</string>
<string name="been_sent">已送出</string> <string name="been_sent">已送出</string>
<string name="been_sent_must">立即送出</string> <string name="been_sent_must">立即送出</string>
<string name="sett_rigger">最低设置2种类型礼物才能触发心愿单特效礼物。</string>
<string name="cancel_ca">不再设置</string>
<string name="settings_ser">去设置</string>
</resources> </resources>

View File

@ -1309,5 +1309,8 @@ Limited ride And limited avatar frame</string>
<string name="the__gifts_in_the_studio">Please make gifts in the studio</string> <string name="the__gifts_in_the_studio">Please make gifts in the studio</string>
<string name="been_sent">Been sent out</string> <string name="been_sent">Been sent out</string>
<string name="been_sent_must">Send out</string> <string name="been_sent_must">Send out</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>
</resources> </resources>