-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Mail validation screen #254
base: main
Are you sure you want to change the base?
Conversation
… even when filled to the max
4fe805d
to
2f92daf
Compare
022ae9c
to
c6954b0
Compare
…sociated exception
34d7fe5
to
e731a5a
Compare
.../com/infomaniak/swisstransfer/ui/screen/newtransfer/validateemail/ValidateUserEmailScreen.kt
Outdated
Show resolved
Hide resolved
...m/infomaniak/swisstransfer/ui/screen/newtransfer/validateemail/ValidateUserEmailViewModel.kt
Outdated
Show resolved
Hide resolved
eda972c
to
0a5806a
Compare
# Conflicts: # app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/ImportFilesViewModel.kt # app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/ImportFilesScreen.kt
horizontalAlignment = layoutStyle.horizontalAlignment, | ||
) { | ||
Text( | ||
text = stringResource(id = R.string.validateMailTitle), |
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.
Do we need to specify id
here ?
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.
_uiState.value = ValidateEmailUiState.Loading | ||
|
||
runCatching { | ||
uploadRepository.verifyEmailCode(VerifyEmailCodeBody(otpCode, email)) |
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.
Since you're using the uploadManager
here, maybe we can add a method in uploadManager
to call the verifyEmailCode
? uploadManager
is used as a common access point for the repository and the controller of uploads so it might be cleaner ?
And if we're a doing that on KMP, we can directly save the token in DB, instead of doing that line 57. Let me know if it'll cause any issue with iOS, as we discussed yesterday as it might interfere with what they did on the native iOS side of things.
Also, we're using the manager to do uploadManager.resendEmailCode(email)
so it might be good to do the same thing for everything else.
errorColor: Color = MaterialTheme.colorScheme.error, | ||
activeBorderThickness: Dp = 2.dp, | ||
inactiveBorderThickness: Dp = 1.dp, | ||
shape: RoundedCornerShape = RoundedCornerShape(8.dp), |
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.
shape: RoundedCornerShape = RoundedCornerShape(8.dp), | |
shape: RoundedCornerShape = CustomShapes.SMALL, |
import com.infomaniak.swisstransfer.ui.theme.SwissTransferTheme | ||
import com.infomaniak.swisstransfer.ui.utils.PreviewLightAndDark | ||
|
||
private val VALID_CHARACTERS = setOf('0', '1', '2', '3', '4', '5', '6', '7', '8', '9') |
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.
Maybe a CharRange ?
private val VALID_CHARACTERS = '0' .. '9'
I tried and it seems to work. Instead of specifying all characters from 0 to 9.
# Conflicts: # app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/ImportFilesViewModel.kt
# Conflicts: # app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/ImportFilesViewModel.kt
8cde32f
to
3084096
Compare
# Conflicts: # app/src/main/java/com/infomaniak/swisstransfer/ui/navigation/NavigationDestination.kt # app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/ImportFilesViewModel.kt # app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/TransferSendManager.kt # app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/importfiles/ImportFilesScreen.kt
…futur email transfers (Missing KMP)
40e505e
to
6ecf5a5
Compare
Quality Gate passedIssues Measures |
Adds the screen to validate the email.
Is still missing:
Depends on: Infomaniak/multiplatform-SwissTransfer#133