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

fix: do not call onNext() from within map #1003

Merged
merged 4 commits into from
May 7, 2024
Merged

Conversation

BeritJanssen
Copy link
Collaborator

Close #1002 . The problem was caused by the checkSectionLoaded mechanism, which was introduced to prevent reloading files for consecutive views, such as in SongSync. The onNext call in the .map loop would cause the next view to be triggered before all files were loaded, as the Originals board contains duplicates of sections.

Moving the onNext() call to after the .map loop should fix this.

Copy link
Contributor

@Evert-R Evert-R left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@BeritJanssen BeritJanssen requested a review from Evert-R May 7, 2024 10:02
@BeritJanssen
Copy link
Collaborator Author

BeritJanssen commented May 7, 2024

I did some refactoring after all, also making sure that resources aren't loaded double anymore, and that the non-webAudio players load all sections instead of just the first one. I tested this for MatchingPairs, ThatsMySong and DDI / BAT, but more testing (Categorization) is very welcome.

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.

[Bug]: "Originals" board MatchingPairsLite does not always play sound
2 participants