-
Notifications
You must be signed in to change notification settings - Fork 423
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
Refactor AppDelegate (milestone 1) #3727
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Posting my comments so far. I'll still need to do some smoke testing.
} | ||
|
||
func applicationWillResignActive(_ application: UIApplication) { | ||
appStateMachine.handle(.suspending) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be called during testing? Would it cause inconsistencies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed with new Testing state
} | ||
|
||
func refreshRemoteMessages() { | ||
// part of debug menu, let's not support it in the first iteration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be able to easily pass remoteMessagingClient to Settings and Debug view - it's already done for multiple objects.
case .launching(let application, let launchOptions): | ||
return Launched(application: application, launchOptions: launchOptions) | ||
case .launching(let application): | ||
return Launched(stateContext: makeStateContext(application: application)) | ||
default: | ||
return handleUnexpectedEvent(event) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note: make sure to rename the pixel (if you want to avoid using app version param) before actual tests so we can easily see if things are not working as expected.
application = stateContext.application | ||
privacyProDataReporter = PrivacyProDataReporter(fireproofing: fireproofing) | ||
vpnWorkaround = VPNRedditSessionWorkaround(accountManager: accountManager, tunnelController: tunnelController) | ||
crashReportUploaderOnboarding = CrashCollectionOnboarding(appSettings: AppDependencyProvider.shared.appSettings) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is a bit concerning here, is that we change the moment things are instantiated and when data is red from the storage - and it's potentially earlier than it used to be in the old implementation so things may not be ready yet. E.g. some of the code here for VPN workaround was instantiated lazily in Task {} when did finish launching has already returned to the OS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
talked through on 1:1, it shouldn't cause any issues, as there's no work happening in the inits
Task/Issue URL: https://app.asana.com/0/0/1208832732122403/f
Tech Design URL: https://app.asana.com/0/481882893211075/1208859623176995/f
CC: @bwaresiak
Description:
Steps to test this PR:
Definition of Done (Internal Only):
Device Testing:
OS Testing: