fix graphql parse thumbnail
This commit is contained in:
parent
4ef78bbe3f
commit
ec592074be
@ -729,8 +729,11 @@ public final class ResponseBodyUtils {
|
||||
width = dimensions.optInt("width");
|
||||
}
|
||||
String thumbnailUrl = null;
|
||||
final JSONArray displayResources = feedItem.getJSONArray("display_resources");
|
||||
final List<MediaCandidate> candidates = new ArrayList<MediaCandidate>();
|
||||
if (feedItem.has("display_resources") || feedItem.has("thumbnail_resources")) {
|
||||
final JSONArray displayResources = feedItem.has("display_resources")
|
||||
? feedItem.getJSONArray("display_resources")
|
||||
: feedItem.getJSONArray("thumbnail_resources");
|
||||
for (int i = 0; i < displayResources.length(); i++) {
|
||||
final JSONObject displayResource = displayResources.getJSONObject(i);
|
||||
candidates.add(new MediaCandidate(
|
||||
@ -739,6 +742,7 @@ public final class ResponseBodyUtils {
|
||||
displayResource.getString("src")
|
||||
));
|
||||
}
|
||||
}
|
||||
final ImageVersions2 imageVersions2 = new ImageVersions2(candidates);
|
||||
|
||||
User user = backup;
|
||||
|
Loading…
Reference in New Issue
Block a user