29 lines
648 B
Java
29 lines
648 B
Java
package de.mrbesen.telegram.objects;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
import org.json.JSONArray;
|
|
import org.json.JSONObject;
|
|
|
|
public class TUserProfilePhotos {
|
|
|
|
private List<List<TPhotoSize>> photos = new ArrayList<>();
|
|
|
|
public TUserProfilePhotos(JSONObject json) {
|
|
JSONArray arr = json.getJSONArray("photos");
|
|
for(int i = 0; !arr.isNull(i); i++) {
|
|
JSONArray ar = arr.getJSONArray(i);
|
|
List<TPhotoSize> insert = new ArrayList<>();
|
|
for(int j = 0; !ar.isNull(j); j++) {
|
|
insert.add(new TPhotoSize(ar.getJSONObject(j)));
|
|
}
|
|
photos.add(insert);
|
|
}
|
|
}
|
|
|
|
public int getLength() {
|
|
return photos.size();
|
|
}
|
|
}
|