use of com.zype.android.webapi.model.video.VideoList in project zype-android by zype.
the class FavoritesFragment method handleRetrieveVideo.
@Subscribe
public void handleRetrieveVideo(VideoListEvent event) {
Logger.d("handleRetrieveVideo(): size=" + event.getEventData().getModelData().getVideoData().size());
VideoList data = event.getEventData().getModelData();
if (data.getVideoData().size() > 0) {
for (VideoData item : data.getVideoData()) {
if (!TextUtils.isEmpty(DataHelper.getFavoriteId(getActivity().getContentResolver(), item.getId()))) {
List<VideoData> videos = new ArrayList<>();
videos.add(item);
DataHelper.insertVideos(getActivity().getContentResolver(), videos);
DataHelper.setFavoriteVideo(getActivity().getContentResolver(), item.getId(), true);
}
}
}
}
Aggregations