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

Make Screen.Push asynchronous when necessary #1490

Merged
merged 18 commits into from
Apr 20, 2018
Merged

Conversation

peppy
Copy link
Sponsor Member

@peppy peppy commented Mar 30, 2018

Also changes behaviour of LoadComponentAsync to make it more versatile.

Will be adding tests to Screen behaviour as it is quite important we get things right.

This allows more complex logic patterns, such as preloading but also avoiding a synchronous load when later using the (potentially) preloaded component.
This ensures no stutters when pushing to an existing screen.
@@ -138,7 +138,7 @@ private void dispose(bool isDisposing)
internal Task LoadAsync(Game game, Drawable target, Action onLoaded = null)
{
if (loadState != LoadState.NotLoaded)
throw new InvalidOperationException($@"{nameof(LoadAsync)} may not be called more than once on the same Drawable.");

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@peppy peppy added the blocked label Mar 30, 2018
@peppy peppy added this to the April 2018 milestone Mar 30, 2018
@peppy peppy added the area:UI label Mar 30, 2018
@smoogipoo
Copy link
Contributor

As discussed - won't be merging this until tests are in-place.

@peppy
Copy link
Sponsor Member Author

peppy commented Apr 17, 2018

Remaining test failures will be fixed once #1524 is merged.

@peppy peppy requested a review from smoogipoo April 18, 2018 08:25
Copy link
Contributor

@smoogipoo smoogipoo left a comment

Choose a reason for hiding this comment

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

Looks fine to me

@smoogipoo smoogipoo merged commit 1059792 into ppy:master Apr 20, 2018
@peppy peppy deleted the async-push branch July 5, 2018 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants