fix [私聊消息-直播中无正在直播标识]
This commit is contained in:
@@ -1297,4 +1297,8 @@ public interface PDLiveApi {
|
||||
@GET("/api/public/?service=Pdlinfos.getIsSet")
|
||||
Observable<ResponseModel<FirstLoginBean>> isFirstLogin(
|
||||
);
|
||||
@GET("/api/public/?service=Pdlinfos.getIsLive")
|
||||
Observable<ResponseModel<List<Integer>>> getUserLiveStatus(
|
||||
@Query("ids")String ids
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3522,6 +3522,25 @@ public class LiveNetManager {
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
public void getUserLiveStatus(String ids,HttpCallback<List<Integer>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getUserLiveStatus(ids)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(roomMicStatusModelResponseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(roomMicStatusModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
private MultipartBody.Part createUploadFile(File file) {
|
||||
RequestBody requestBody = RequestBody.create(MediaType.parse("multipart/form-data"), file);
|
||||
return MultipartBody.Part.createFormData("file", file.getName(), requestBody);
|
||||
|
||||
Reference in New Issue
Block a user