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

Fixed map sometimes not loading bug #7446

Merged
merged 2 commits into from
May 29, 2024
Merged

Conversation

gabriellui1
Copy link
Collaborator

fixes ENG-517
image

@gabriellui1 gabriellui1 force-pushed the gabriel/map-not-loading-issue branch from 3c8679b to 872f712 Compare May 16, 2024 00:32
@gabriellui1
Copy link
Collaborator Author

Not sure why commits from other branches were on this PR but this should be fixed now.

if (levelPositions[idx]) {
this.courseLevelsFake[idx].position = levelPositions[idx]
}
return this.listenToOnce(this.campaign, 'sync', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

i don't think this could work. since courseLevels and campaign load is sync and we're not sure which is sync first. (actually I doubt campaign would be fast) so I think you need some thing like

listenToOnce(courseLevels, () => courseLevelsLoaded = true; checking())
listenToOnce(campaign, () => campaignLoaded = true; checking()) 

and in checking function,
only when courseLevelsLoaded and campaignLoaded both true, run following logics, reasonable?

Copy link
Contributor

@smallst smallst left a comment

Choose a reason for hiding this comment

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

LGTM. not test

Copy link
Collaborator

@adamkecskes adamkecskes left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you @gabriellui1 for fixing this! Just tested and works perfectly!

@mrfinch mrfinch merged commit b8bab8c into master May 29, 2024
2 checks passed
@mrfinch mrfinch deleted the gabriel/map-not-loading-issue branch May 29, 2024 07:44
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.

None yet

4 participants