loading dialog stays untill all tracks are rendered #114
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, the "loading" dialog disappeared when all cells are selected. This is usually a lot faster than fetching and rendering all the tracks. In this PR, I have added the functionality, that the loading dialog stays until all tracks are actually rendered on the screen.
I have created
Promises
that are keeping track of each track and lineage being rendered. A.finally()
statements checks when all promises are full-filled, and then removes the loading-dialog.Promises are new to me, so I am not sure if this is the best implementation. But the warning dialog works, and it doesn't seem to impact performance, since all the fetching and rendering still happen asynchronously.