新增关注的code提示

This commit is contained in:
zlzw 2023-08-14 18:05:55 +08:00
parent f91ba79c5c
commit 9818a1af74

View File

@ -57,6 +57,8 @@ import com.yunbao.common.http.API;
import com.yunbao.common.http.ResponseModel; import com.yunbao.common.http.ResponseModel;
import com.yunbao.common.http.base.CheckLiveCallBack; import com.yunbao.common.http.base.CheckLiveCallBack;
import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -176,8 +178,16 @@ public class LiveNetManager {
.subscribe(listResponseModel -> { .subscribe(listResponseModel -> {
List<SetAttentsModel> setAttentsModels = listResponseModel.getData().getInfo(); List<SetAttentsModel> setAttentsModels = listResponseModel.getData().getInfo();
if (setAttentsModels.size() > 0) { if (setAttentsModels.size() > 0) {
if (callback != null) if (callback != null) {
if (listResponseModel.getData().getCode() == 1001) {
if (WordUtil.isNewZh()) {
ToastUtil.show("粉絲團等級已清零,待領取獎勵已自動領取至【個性裝扮】");
} else {
ToastUtil.show("The level of the fan club has been cleared, and the rewards to be claimed have been automatically received to [Personalized Dressing]");
}
}
callback.onSuccess(setAttentsModels.get(0)); callback.onSuccess(setAttentsModels.get(0));
}
} else { } else {
if (callback != null) if (callback != null)
callback.onError("操作失效"); callback.onError("操作失效");
@ -1985,9 +1995,9 @@ public class LiveNetManager {
}).isDisposed(); }).isDisposed();
} }
public void getGiftGuide(String liveUid,String toUid ,HttpCallback<List<GiftGuideModel>> callback) { public void getGiftGuide(String liveUid, String toUid, HttpCallback<List<GiftGuideModel>> callback) {
API.get().pdLiveApi(mContext) API.get().pdLiveApi(mContext)
.getGiftGuide(liveUid,toUid) .getGiftGuide(liveUid, toUid)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<GiftGuideModel>>>() { .subscribe(new Consumer<ResponseModel<List<GiftGuideModel>>>() {
@ -2007,9 +2017,9 @@ public class LiveNetManager {
}).isDisposed(); }).isDisposed();
} }
public void getGiftGuideHistory(String toUid,String liveUid, HttpCallback<List<GiftGuideModel>> callback) { public void getGiftGuideHistory(String toUid, String liveUid, HttpCallback<List<GiftGuideModel>> callback) {
API.get().pdLiveApi(mContext) API.get().pdLiveApi(mContext)
.getGiftGuideHistory(liveUid,toUid) .getGiftGuideHistory(liveUid, toUid)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<GiftGuideModel>>>() { .subscribe(new Consumer<ResponseModel<List<GiftGuideModel>>>() {
@ -2138,6 +2148,7 @@ public class LiveNetManager {
} }
}).isDisposed(); }).isDisposed();
} }
public void getCheckFansLevelUpgrade(String liveUid, HttpCallback<FansCheckRed> callback) { public void getCheckFansLevelUpgrade(String liveUid, HttpCallback<FansCheckRed> callback) {
API.get().pdLiveApi(mContext) API.get().pdLiveApi(mContext)
.getCheckFansLevelUpgrade(liveUid) .getCheckFansLevelUpgrade(liveUid)