fix [私聊消息-直播中无正在直播标识]

This commit is contained in:
2024-03-23 16:49:47 +08:00
parent d08861a082
commit c20708d633
6 changed files with 152 additions and 24 deletions

View File

@@ -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
);
}

View File

@@ -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);