Make image to work

Summary: ImageManager is used to update the LocalData of Image views, as part of this process we call ImageManager::requestImage in cross platform code. Event if Android doesn't use ImageRequest we need to return an empty non-operation version of this object.

Reviewed By: shergin

Differential Revision: D10429663

fbshipit-source-id: 3621ece72f7291e2e6ab6a84b238ac16b595fc18
This commit is contained in:
David Vacca
2018-10-22 01:04:59 -07:00
committed by Facebook Github Bot
parent 6debfdf6d6
commit 0984196220
3 changed files with 5 additions and 1 deletions

View File

@@ -33,6 +33,8 @@ class ImageRequest final {
*/
class ImageNoLongerNeededException;
ImageRequest();
/*
* `ImageRequest` is constructed with `ImageSource` and
* `ImageResponse` future which must be moved in inside the object.

View File

@@ -20,7 +20,7 @@ ImageManager::~ImageManager() {
ImageRequest ImageManager::requestImage(const ImageSource &imageSource) const {
// Not implemented.
abort();
return {};
}
} // namespace react

View File

@@ -10,6 +10,8 @@
namespace facebook {
namespace react {
ImageRequest::ImageRequest() {}
ImageRequest::ImageRequest(
const ImageSource &imageSource,
folly::Future<ImageResponse> &&responseFuture) {