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: Introduced AppLifecycleHelper #13999

Merged
merged 8 commits into from
Nov 27, 2023

Conversation

0x5bfa
Copy link
Member

@0x5bfa 0x5bfa commented Nov 21, 2023

Summary

As the title.

Task Checklist

  • Introduced Constants.AutomatedWorkflowInjectionKeys
  • Introduced AppLifecycleHelper
  • Moved static methods into Files.Helpers.AppLifecycleHelper from Files.App class
  • Fixed an issue where the initialzation of the AppCenter would cause a crash when the initialization process throw en exception due to uninitialization of App.Logger
  • Remove static utilities in App class and replace them with the DI

Steps To Validate Changes

N/A

Known Issues

N/A

PR Checklist

Screenshots

N/A

Footnotes

  1. If the request hasn't been agreed by the team, this work might be rejected. Make sure that you get approval from the team before opening any PR related the request.

  2. If you removed any en-US string resources, make sure that there are no references of those resources. When you add a new en-US string resources, do not make any changes on other languages' resources; Crowdin will do that, instead.

src/Files.App/Constants.cs Outdated Show resolved Hide resolved
yaira2
yaira2 previously approved these changes Nov 22, 2023
@yaira2 yaira2 requested a review from d2dyno1 November 22, 2023 18:52
@0x5bfa 0x5bfa marked this pull request as ready for review November 23, 2023 05:06
@d2dyno1
Copy link
Member

d2dyno1 commented Nov 23, 2023

From the initial look-through, it looks good 👌
However, I'd like to have the methods that handle app exceptions to be within App.xaml.cs, but keep the AppUnhandledException() method (that pushes the toast) inside AppLifecycleHelper 🙂

@yaira2 yaira2 added ready to merge Pull requests that are approved and ready to merge and removed needs - code review labels Nov 27, 2023
@yaira2 yaira2 merged commit 9bc78d7 into files-community:main Nov 27, 2023
6 checks passed
@0x5bfa 0x5bfa deleted the 5bfa/Introduce-AppLifecycleHelper branch November 27, 2023 22:39
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.

Code Quality: Break down service registration in App.xaml.cs into granular methods
3 participants