mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-07 03:07:26 +01:00
Version v5.4.0-beta1. Minor bugs fixed.
This commit is contained in:
parent
68ed718aa0
commit
282817c192
@ -50,6 +50,7 @@ class ParseSubscribedThing {
|
|||||||
ArrayList<SubscribedUserData> subscribedUserData,
|
ArrayList<SubscribedUserData> subscribedUserData,
|
||||||
ArrayList<SubredditData> subredditData,
|
ArrayList<SubredditData> subredditData,
|
||||||
ParseSubscribedSubredditsListener parseSubscribedSubredditsListener) {
|
ParseSubscribedSubredditsListener parseSubscribedSubredditsListener) {
|
||||||
|
this.parseSubscribedSubredditsListener = parseSubscribedSubredditsListener;
|
||||||
try {
|
try {
|
||||||
jsonResponse = new JSONObject(response);
|
jsonResponse = new JSONObject(response);
|
||||||
this.accountName = accountName;
|
this.accountName = accountName;
|
||||||
@ -60,16 +61,18 @@ class ParseSubscribedThing {
|
|||||||
newSubscribedSubredditData = new ArrayList<>();
|
newSubscribedSubredditData = new ArrayList<>();
|
||||||
newSubscribedUserData = new ArrayList<>();
|
newSubscribedUserData = new ArrayList<>();
|
||||||
newSubredditData = new ArrayList<>();
|
newSubredditData = new ArrayList<>();
|
||||||
this.parseSubscribedSubredditsListener = parseSubscribedSubredditsListener;
|
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
parseSubscribedSubredditsListener.onParseSubscribedSubredditsFail();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Void doInBackground(Void... voids) {
|
protected Void doInBackground(Void... voids) {
|
||||||
try {
|
try {
|
||||||
|
if (jsonResponse == null) {
|
||||||
|
parseFailed = true;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
JSONArray children = jsonResponse.getJSONObject(JSONUtils.DATA_KEY).getJSONArray(JSONUtils.CHILDREN_KEY);
|
JSONArray children = jsonResponse.getJSONObject(JSONUtils.DATA_KEY).getJSONArray(JSONUtils.CHILDREN_KEY);
|
||||||
for (int i = 0; i < children.length(); i++) {
|
for (int i = 0; i < children.length(); i++) {
|
||||||
JSONObject data = children.getJSONObject(i).getJSONObject(JSONUtils.DATA_KEY);
|
JSONObject data = children.getJSONObject(i).getJSONObject(JSONUtils.DATA_KEY);
|
||||||
|
Loading…
Reference in New Issue
Block a user