use of com.abewy.android.apps.klyph.fragment.StreamFragment.StreamLikeCount in project Klyph by jonathangerbaud.
the class ImageFragment method populate.
@Override
protected void populate(List<GraphObject> data) {
if (data.size() > 0) {
GraphObject object = data.get(0);
if (object instanceof Photo) {
Photo photo = (Photo) data.get(0);
// if (this.photo == null)
// {
setPhoto(photo);
// }
getAdapter().add(photo);
likeTitle = new StreamLikeCount();
getAdapter().add(likeTitle);
refreshLikeCount();
data.remove(0);
super.populate(data);
setRequestType(Query.COMMENTS);
setNoMoreData(false);
(getActivity()).invalidateOptionsMenu();
refresh();
} else {
super.populate(data);
setNoMoreData(!isFirstLoad() && (data.size() == 0 || (getRequest().getPagingNext() == null || getRequest().getPagingNext().length() == 0)));
setOffset(getAfterCursor());
}
} else {
super.populate(data);
setNoMoreData(!isFirstLoad() && (data.size() == 0 || (getRequest().getPagingNext() == null || getRequest().getPagingNext().length() == 0)));
setOffset(getAfterCursor());
}
}
Aggregations