Skip to content

update Published properties of ImageManager in the main thread #233

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

Closed
wants to merge 1 commit into from
Closed

Conversation

katerynatsy
Copy link

@katerynatsy katerynatsy commented Sep 21, 2022

What?

update Published properties of ImageManager in the main thread

Why?

Publishing changes from background threads is not allowed; make sure to publish values from the main thread.

How?

As a temporary solution, enforcing assigning new values in the main thread but ideally it should be done via subscription to model changes and triggering changes as e response. i.e. via PassthroughSubject and operators like receive(on:)).

Screen Shot 2022-09-21 at 8 42 54 pm

@Dmitry-rman
Copy link

I have a same issue on screen with dynamic list of images, thanks! iOS 16.0 only

@dreampiggy
Copy link
Collaborator

I don't think this fix is correct.

See #232, which dispatch the onAppear in correct timing

@dreampiggy dreampiggy added this to the 2.2.0 milestone Sep 22, 2022
@dreampiggy
Copy link
Collaborator

Since the #232 do the similiar things (It dispatch the onAppear with dispatch async to main), so use that instead, I just close it.

The feature is embed into that PR.

@dreampiggy dreampiggy closed this Sep 22, 2022
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.

3 participants