mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
fix achievement zero issue (#4737)
Co-authored-by: Pratham2305 <Pratham2305@users.noreply.github.com>
This commit is contained in:
parent
d38c3f1427
commit
d8bfd1ffc5
1 changed files with 4 additions and 0 deletions
|
|
@ -216,6 +216,8 @@ public class OkHttpJsonApiClient {
|
||||||
if (json == null) {
|
if (json == null) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
// Extract JSON from response
|
||||||
|
json = json.substring(json.indexOf('{'));
|
||||||
GetWikidataEditCountResponse countResponse = gson
|
GetWikidataEditCountResponse countResponse = gson
|
||||||
.fromJson(json, GetWikidataEditCountResponse.class);
|
.fromJson(json, GetWikidataEditCountResponse.class);
|
||||||
if (null != countResponse) {
|
if (null != countResponse) {
|
||||||
|
|
@ -253,6 +255,8 @@ public class OkHttpJsonApiClient {
|
||||||
if (json == null) {
|
if (json == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
// Extract JSON from response
|
||||||
|
json = json.substring(json.indexOf('{'));
|
||||||
Timber.d("Response for achievements is %s", json);
|
Timber.d("Response for achievements is %s", json);
|
||||||
try {
|
try {
|
||||||
return gson.fromJson(json, FeedbackResponse.class);
|
return gson.fromJson(json, FeedbackResponse.class);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue