use of com.hippo.ehviewer.client.data.GalleryPreview in project EhViewer by seven332.
the class GalleryPreviewsScene method onItemClick.
@Override
public boolean onItemClick(EasyRecyclerView parent, View view, int position, long id) {
Context context = getContext2();
if (null != context && null != mHelper && null != mGalleryInfo) {
GalleryPreview p = mHelper.getDataAt(position);
Intent intent = new Intent(context, GalleryActivity.class);
intent.setAction(GalleryActivity.ACTION_EH);
intent.putExtra(GalleryActivity.KEY_GALLERY_INFO, mGalleryInfo);
intent.putExtra(GalleryActivity.KEY_PAGE, p.getPosition());
startActivity(intent);
}
return true;
}
use of com.hippo.ehviewer.client.data.GalleryPreview in project EhViewer by seven332.
the class GalleryPreviewsScene method onGetPreviewSetSuccess.
private void onGetPreviewSetSuccess(Pair<PreviewSet, Integer> result, int taskId) {
if (null != mHelper && mHelper.isCurrentTask(taskId) && null != mGalleryInfo) {
PreviewSet previewSet = result.first;
int size = previewSet.size();
ArrayList<GalleryPreview> list = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
list.add(previewSet.getGalleryPreview(mGalleryInfo.gid, i));
}
mHelper.setPages(taskId, result.second);
mHelper.onGetPageData(taskId, list);
}
}
Aggregations