合并修正

This commit is contained in:
khy
2016-12-06 17:29:44 +08:00
parent ce841476ae
commit 3c0b56c99a
3 changed files with 7 additions and 8 deletions

View File

@ -109,8 +109,10 @@ public class PostCommentUtils {
private static void addReportData(final Context context, final String reportData,
final PostCommentListener listener, boolean isCheck) {
RequestBody body = RequestBody.create(MediaType.parse("application/json"), reportData);
RetrofitManager.getComment().postReportData(body,TokenUtils.getToken(context, isCheck),
new com.gh.gamecenter.retrofit.Response<ResponseBody>(){
RetrofitManager.getComment().postReportData(body,TokenUtils.getToken(context, isCheck))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Response<ResponseBody>(){
@Override
public void onNext(ResponseBody response) {
super.onNext(response);
@ -127,9 +129,10 @@ public class PostCommentUtils {
}
}
Utils.log("addReportData=onError::" + e.toString());
listener.postFailed(null);
listener.postFailed(e);
}
});
}
public interface PostCommentListener {