Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing change in RCTImageFromLocalAssetURL behavior. #122

Closed
wants to merge 1 commit into from

Conversation

douglasjunior
Copy link

@douglasjunior douglasjunior commented Nov 12, 2017

This change add onLoad and onLoadEnd for RCTImageFromLocalAssetURL image load.

In the most recent version of RN 0.50.x, it changed the RCTImageFromLocalAssetURL behavior. And then, now RCTImageFromLocalAssetURL also loads images from the web. So, react-native-photo-view is never calling the onLoad and onLoadEnd events.

I also opened a issue in RN repository to ask if this is intentional or a bug. facebook/react-native#16800

@just4fun
Copy link

just4fun commented Dec 3, 2017

@alwx - my RN version is 0.42.2 and I got error for RCTImageFromLocalAssetURL while building project. Could you review this PR to see whether it could resolve the issue?

@douglasjunior
Copy link
Author

@just4fun RN 0.42.x is very old. Try to use an old version of photo-view.

@asolas
Copy link

asolas commented Feb 2, 2018

if (RCTIsLocalAssetURL(imageURL)){ UIImage *image = RCTImageFromLocalAssetURL(imageURL); [self setLoadingImage:image]; }

try this

@douglasjunior
Copy link
Author

@asolas the problem here, is that in the most recent of React Native version the photo-view never call onLoad and onLoadEnd events on iOS.

@just4fun is trying to use this PR with a very older version of React native, it dont work.

@douglasjunior
Copy link
Author

douglasjunior commented Feb 2, 2018

Who wants to try this PR, please use my Fork:

(remember, this will work for RN >= 0.50.0)

"react-native-photo-view": "git+https://github.com/douglasjunior/react-native-photo-view.git#patch-2"

@alwx please, could you look to this PR?

@zackify
Copy link

zackify commented Jun 25, 2018

@alwx maybe consider adding @douglasjunior as a contributor so he can make releases?

@rodrigobdz
Copy link

@alwx @zackify's suggestion sounds good. Have you considered it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants