diff --git a/app/build.gradle b/app/build.gradle index aa5a6c5e..0801f4da 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "com.kidozh.discuzhub" minSdkVersion 23 targetSdkVersion 29 - versionCode 9 - versionName "1.8" + versionCode 10 + versionName "1.9" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { diff --git a/app/src/main/java/com/kidozh/discuzhub/activities/bbsShowPostActivity.java b/app/src/main/java/com/kidozh/discuzhub/activities/bbsShowPostActivity.java index 8ac344f5..8c669079 100644 --- a/app/src/main/java/com/kidozh/discuzhub/activities/bbsShowPostActivity.java +++ b/app/src/main/java/com/kidozh/discuzhub/activities/bbsShowPostActivity.java @@ -944,7 +944,7 @@ private void postCommentToThread(String message){ FormBody formBody = formBodyBuilder.build(); Log.d(TAG,"get Form "+message+" hash " +formHash+" fid "+fid+" tid "+tid - + " API ->"+ URLUtils.getReplyThreadUrl(fid,tid)+" formbody "+formBody.toString()); + + " API ->"+ URLUtils.getReplyThreadUrl(fid,tid)+" formhash "+formHash); Request request = new Request.Builder() .url(URLUtils.getReplyThreadUrl(fid,tid)) .post(formBody) @@ -969,7 +969,7 @@ public void run() { @Override public void onResponse(Call call, Response response) throws IOException { - if(response.body()!=null){ + if(response.isSuccessful() && response.body()!=null){ String s = response.body().string(); Log.d(TAG,"Recv comment info "+s); bbsParseUtils.returnMessage returnedMessage = bbsParseUtils.parseReturnMessage(s); diff --git a/app/src/main/java/com/kidozh/discuzhub/adapter/IntroSuggestionAdapter.java b/app/src/main/java/com/kidozh/discuzhub/adapter/IntroSuggestionAdapter.java index e250bf3f..46095538 100644 --- a/app/src/main/java/com/kidozh/discuzhub/adapter/IntroSuggestionAdapter.java +++ b/app/src/main/java/com/kidozh/discuzhub/adapter/IntroSuggestionAdapter.java @@ -120,9 +120,7 @@ private void queryBBSInfo(String base_url, Boolean useSafeClient, IntroSuggestio Request request; try{ URL url = new URL(query_url); - if(url.getAuthority()!=null && url.getHost()!=null){ - throw new Exception(); - } + request = new Request.Builder().url(query_url).build(); }