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

✨ Add locks to the image provider #993

Merged
merged 3 commits into from
Sep 27, 2023
Merged

Conversation

AlexV525
Copy link
Member

@AlexV525
Copy link
Member Author

@LeGoffMael Could you help test the fix?

@CaiJingLong
Copy link
Member

This is an attempt to solve the concurrency problem of ImageProvider from the dart layer.
Android uses Glide to load thumbnails, and there are no network images, so there are no concurrency issues

iOS has icloud and PHAssetResource and caches them locally, so there will be some problems.
I plan to build a simple local caching natively on iOS to solve this problem in the future. Before that, we can try to use the code of this PR.

@LeGoffMael
Copy link

Hi @AlexV525, i will check it later tonight

@LeGoffMael
Copy link

LeGoffMael commented Sep 26, 2023

I just tested using insta_assets_picker example app and it seems that the error is fixed !

I tried to load assets on my iPhone (from local and iCloud) multiple times and i could not reproduce the problem.
I restarted my phone, cleaned the project and deleted the example app between each test (with and without the fix).

@AlexV525 AlexV525 merged commit 2cfa2f6 into main Sep 27, 2023
26 checks passed
@AlexV525 AlexV525 deleted the feat/image-provider-locks branch September 27, 2023 02:59
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.

version 2.0.0 ios photo_manager error
3 participants