修复了文章评论举报问题

This commit is contained in:
chenjuntao
2018-10-26 18:02:07 +08:00
parent 8702440474
commit 36b0676bfc
15 changed files with 329 additions and 61 deletions

View File

@ -191,6 +191,30 @@ public class PostCommentUtils {
});
}
public static void reportCommunityArticleComment(final Context context,
final String communityId,
final String articleId,
final String commentId,
final String reportData,
final PostCommentListener listener) {
RequestBody body = RequestBody.create(MediaType.parse("application/json"), reportData);
RetrofitManager.getInstance(context).getApi()
.postCommunityArticleCommentReport(communityId, articleId, 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);