mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +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) {
|
||||
return 0;
|
||||
}
|
||||
// Extract JSON from response
|
||||
json = json.substring(json.indexOf('{'));
|
||||
GetWikidataEditCountResponse countResponse = gson
|
||||
.fromJson(json, GetWikidataEditCountResponse.class);
|
||||
if (null != countResponse) {
|
||||
|
|
@ -253,6 +255,8 @@ public class OkHttpJsonApiClient {
|
|||
if (json == null) {
|
||||
return null;
|
||||
}
|
||||
// Extract JSON from response
|
||||
json = json.substring(json.indexOf('{'));
|
||||
Timber.d("Response for achievements is %s", json);
|
||||
try {
|
||||
return gson.fromJson(json, FeedbackResponse.class);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue