add imageQuality to the API (not mandatory)

This commit is contained in:
Ran Greenberg 2017-03-28 17:44:25 +03:00
parent e66a42403d
commit e6381ec444
1 changed files with 7 additions and 4 deletions

View File

@ -10,15 +10,18 @@ async function getAlbumsWithThumbnails() {
}
async function getImageUriForId(imageId) {
const images = await CKGallery.getImagesForIds(imagesId);
const images = await CKGallery.getImagesForIds([imageId]);
if (!images) {
return;
}
return images.uri;
if (images.length === 1) {
return images[0].uri;
}
return;
}
async function getImagesForIds(imagesId = []) {
const images = await CKGallery.getImagesForIds(imagesId);
async function getImagesForIds(imagesId = [], imageQuality) {
const images = await CKGallery.getImagesForIds(imagesId, imageQuality);
return images;
}