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

Call LottieTask listeners synchronously when already on the main thread #2470

Merged
merged 1 commit into from Feb 27, 2024

Conversation

gpeal
Copy link
Collaborator

@gpeal gpeal commented Feb 27, 2024

When we are already on the main thread, there is no need to post listeners to the main thread again.

As a side effect, this fixes #2449. The listener was called twice because it was called synchronously in addListener because it was already done and then because of the post, it was called again.

Fixes #2449

Copy link

Snapshot Tests
API 23: Report Diff
API 31: Report Diff

@gpeal gpeal merged commit f0f24b9 into master Feb 27, 2024
6 checks passed
@gpeal gpeal deleted the gpeal/synchronous-task-main-thread branch February 27, 2024 16:58
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.

LottieTask listener triggers twice if a cached url is retrieved a second time
1 participant