-
Notifications
You must be signed in to change notification settings - Fork 147
Show an account provider picker on the server confirmation screen when required. #4137
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
Conversation
Simplify the authentication flow coordinator, removing the restricted state.
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.
Decided to simplify this as discussed in #4131 (comment)
Ah crap, that wasn't what the comment suggested 🙈
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.
Follow-up to #4131 (comment)
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## develop #4137 +/- ##
===========================================
+ Coverage 79.24% 79.34% +0.09%
===========================================
Files 813 813
Lines 74184 74418 +234
===========================================
+ Hits 58787 59045 +258
+ Misses 15397 15373 -24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
// Don't bother reconfiguring the service if it has already been done for the selected server. | ||
let homeserver = authenticationService.homeserver.value | ||
guard homeserver.loginMode == .unknown || homeserver.address != accountProvider else { | ||
await fetchLoginURLIfNeededAndContinue() | ||
return | ||
} | ||
|
||
// Note: We don't show the spinner until now as it isn't needed if the service is already | ||
// configured and we're about to use password based login | ||
startLoading() | ||
defer { stopLoading() } |
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.
I guess this code is reused across the 2 functions and could be extracted into a separate function
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.
It's ever so slightly different. The first one checks whether the flow matches, the second checks whether the server is the same.
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.
LGTM
Will only be shown if the app is configured with multiple account providers and restricted to not allow any other provider to be selected. Can be reviewed commit-by-commit.
Screen.Recording.2025-05-20.at.3.52.39.pm.mov