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

Code Quality: Use TaskCompletionSource for splash screen loading #13038

Merged
merged 5 commits into from
Jul 23, 2023

Conversation

gave92
Copy link
Member

@gave92 gave92 commented Jul 22, 2023

Resolved / Related Issues

  • Were these changes approved in an issue or discussion with the project maintainers? In order to prevent extra work, feature requests and changes to the codebase must be approved before the pull request will be reviewed. This prevents extra work for the contributors and maintainers.
    Closes #issue...

This PR modifies the splash screen loading wait to use TaskCompletionSource instead of looping. @hishitetsu what do you think?

Validation
How did you test these changes?

  • Did you build the app and test your changes?

Copy link
Member

@hishitetsu hishitetsu left a comment

Choose a reason for hiding this comment

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

Thank you! I didn't have time to think about how to do things better because I prioritized releasing improvements to stable right away.
LGTM

Copy link
Member

@hishitetsu hishitetsu left a comment

Choose a reason for hiding this comment

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

TaskCompletionSource should be disposed of when it is no longer needed.

src/Files.App/App.xaml.cs Outdated Show resolved Hide resolved
src/Files.App/App.xaml.cs Outdated Show resolved Hide resolved
src/Files.App/App.xaml.cs Outdated Show resolved Hide resolved
src/Files.App/Views/SplashScreenPage.xaml.cs Outdated Show resolved Hide resolved
src/Files.App/Views/SplashScreenPage.xaml.cs Outdated Show resolved Hide resolved
@gave92
Copy link
Member Author

gave92 commented Jul 23, 2023

TaskCompletionSource should be disposed of when it is no longer needed.

? TaskCompletionSource is not IDisposable.

@hishitetsu
Copy link
Member

? TaskCompletionSource is not IDisposable.

Sorry, I didn't word it well. When it is no longer needed, it should be nulled to free up memory.

Copy link
Member

@hishitetsu hishitetsu left a comment

Choose a reason for hiding this comment

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

LGTM

@gave92 gave92 added the ready to merge Pull requests that are approved and ready to merge label Jul 23, 2023
@yaira2
Copy link
Member

yaira2 commented Jul 23, 2023

Thank you

@yaira2 yaira2 merged commit dee9a6e into files-community:main Jul 23, 2023
@gave92 gave92 deleted the wait_splash branch July 23, 2023 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants