Skip to content

Fix WebImage with indicator, when quick scroll without cache, may cause recursion #39

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

Merged
merged 2 commits into from
Nov 2, 2019

Conversation

dreampiggy
Copy link
Collaborator

See the comment for reason:

// There are race condition when quick scroll, because SwiftUI handle for that @Published property
// Indicator modifier code go into `if` condition and trigger `WebImage.body` (*)
// Previous View struct call `onDisappear` and cancel the currentOperation
// currentOperation then call error block, and isLoading = true again
// isLoading true again trigger another new indicator, go into `else` condition and `Indicator.builder`
// Current View struct loaded finished, call isLoading = true again
// goto (*)

@dreampiggy dreampiggy merged commit d1acfc5 into master Nov 2, 2019
@dreampiggy dreampiggy deleted the fix_quick_scroll_webimage_cpu_usage branch November 2, 2019 03:50
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.

1 participant