-
Notifications
You must be signed in to change notification settings - Fork 673
Fix issue with "Change email" behavior in Link #10706
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
base: master
Are you sure you want to change the base?
Conversation
get() { | ||
val clearCustomerDetails = linkAccount == null | ||
val effectiveCustomerInfo = if (clearCustomerDetails) { | ||
LinkConfiguration.CustomerInfo(null, null, null, null) |
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 was thinking of only setting the email address to null
and keeping the other values as-is, but Web seems to fully clear the customer info for the same flow.
@@ -285,7 +296,7 @@ internal class LinkActivityViewModel @Inject constructor( | |||
|
|||
DaggerNativeLinkComponent | |||
.builder() | |||
.configuration(args.configuration) | |||
.configuration(args.configurationWithUpdatedCustomerInfo) |
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.
Might be weird that this happens here, but if we don't update the configuration
, then this code will fetch the Link account associated with that email address.
Diffuse output:
APK
|
f726bfa
to
e2f1285
Compare
After selecting "Change email" and closing the flow, we now show the signup screen on re-open instead of the verification screen.
e2f1285
to
3369932
Compare
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! one small comment
@@ -271,3 +278,16 @@ internal sealed interface ScreenState { | |||
} | |||
|
|||
internal class NoArgsException : IllegalArgumentException("NativeLinkArgs not found") | |||
|
|||
private val NativeLinkArgs.configurationWithUpdatedCustomerInfo: LinkConfiguration |
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.
nit - I think this is more understandable as an extension function of LinkConfiguration
, so that it reads:
args.configuration.withUpdatedCustomerInfo(args.LinkAccount)
- might be a bit more verbose on the other hand so leave it as is if it makes sense!
Summary
This pull request fixes an issue with the “Change email” behavior in Link.
After selecting “Change email” and closing the flow, we now show the signup screen on re-open instead of the verification screen. This makes more sense, since the user already indicated that they don't want to use the email address that we pull from the
CustomerInfo
object.Motivation
LINK_MOBILE-165
Testing
Screen recordings
Before
Screen_recording_20250423_113043.mp4
After
Screen_recording_20250423_112842.mp4
Changelog