Skip to content

Commit

Permalink
Fixes Image load event in new arch (#44918)
Browse files Browse the repository at this point in the history
Summary:
Fixes #44896. cc cipolleschi

## Changelog:

[IOS] [FIXED] - Fixes Image load event in new arch

Pull Request resolved: #44918

Test Plan: #44896

Reviewed By: dmytrorykun

Differential Revision: D59108500

Pulled By: cipolleschi

fbshipit-source-id: 1fad4f82288141e9fc37f525be7073deb81c542c
  • Loading branch information
zhongwuzw authored and facebook-github-bot committed Jun 28, 2024
1 parent e320ab4 commit 7698cd0
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ - (void)didReceiveImage:(UIImage *)image metadata:(id)metadata fromObserver:(con
return;
}

static_cast<const ImageEventEmitter &>(*_eventEmitter).onLoad(_state->getData().getImageSource());
auto imageSource = _state->getData().getImageSource();
imageSource.size = {image.size.width, image.size.height};

static_cast<const ImageEventEmitter &>(*_eventEmitter).onLoad(imageSource);
static_cast<const ImageEventEmitter &>(*_eventEmitter).onLoadEnd();

const auto &imageProps = static_cast<const ImageProps &>(*_props);
Expand Down

0 comments on commit 7698cd0

Please sign in to comment.