回答详情也以及回答列表问题修复

This commit is contained in:
chenjuntao
2018-04-11 19:01:06 +08:00
parent cdc001b43e
commit ee6337276c
15 changed files with 156 additions and 81 deletions

View File

@ -156,6 +156,26 @@ public class PostCommentUtils {
});
}
public static void postAnswerReportData(final Context context, final String commentId, final String answerId, final String reportData,
final PostCommentListener listener) {
RequestBody body = RequestBody.create(MediaType.parse("application/json"), reportData);
RetrofitManager.getInstance(context).getApi()
.postReportOfAnswerComment(answerId, commentId, body)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Response<ResponseBody>() {
@Override
public void onResponse(ResponseBody response) {
listener.postSuccess(null);
}
@Override
public void onFailure(HttpException e) {
listener.postFailed(e);
}
});
}
public interface PostCommentListener {
void postSuccess(JSONObject response);