mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 22:03:55 +01:00
* fixed issue #2065 for achievements activity * updates for issue #2154 * removed unwanted comments and undo gradle changes * added strings to strings.xml * changes made after reviews * review changes * build issues resolved * Undo changes in gradle properties
This commit is contained in:
parent
10e57bd8d0
commit
e69c03cf83
3 changed files with 82 additions and 26 deletions
|
|
@ -45,6 +45,7 @@ import java.util.concurrent.Callable;
|
|||
import fr.free.nrw.commons.BuildConfig;
|
||||
import fr.free.nrw.commons.Media;
|
||||
import fr.free.nrw.commons.PageTitle;
|
||||
import fr.free.nrw.commons.achievements.FeaturedImages;
|
||||
import fr.free.nrw.commons.R;
|
||||
import fr.free.nrw.commons.achievements.FeedbackResponse;
|
||||
import fr.free.nrw.commons.auth.AccountUtil;
|
||||
|
|
@ -63,7 +64,6 @@ import okhttp3.OkHttpClient;
|
|||
import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
import timber.log.Timber;
|
||||
|
||||
import static fr.free.nrw.commons.utils.ContinueUtils.getQueryContinue;
|
||||
|
||||
/**
|
||||
|
|
@ -1002,7 +1002,15 @@ public class ApacheHttpClientMediaWikiApi implements MediaWikiApi {
|
|||
if (json == null) {
|
||||
return null;
|
||||
}
|
||||
return gson.fromJson(json, FeedbackResponse.class);
|
||||
Timber.d(json);
|
||||
try {
|
||||
return gson.fromJson(String.valueOf(response.body()), FeedbackResponse.class);
|
||||
}
|
||||
catch (Exception e){
|
||||
return new FeedbackResponse("",0,0,0,new FeaturedImages(0,0),0,"",0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue