Skip to content

Commit

Permalink
fix login problems
Browse files Browse the repository at this point in the history
  • Loading branch information
kidozh committed Jun 7, 2020
1 parent f5c1b4f commit ee9bbaf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

}
Expand Down

0 comments on commit ee9bbaf

Please sign in to comment.