Fix typos in generator actions (#4310)

This commit is contained in:
Dave Severns 2024-11-15 11:32:09 -05:00 committed by GitHub
parent d125fab0b7
commit 1b0bc13903
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 11 deletions

View file

@ -213,7 +213,7 @@ class GeneratorViewModel @Inject constructor(
handleUpdateGeneratedPassphraseResult(action)
}
is GeneratorAction.Internal.UpdateGeneratedPlusAddessedUsernameResult -> {
is GeneratorAction.Internal.UpdateGeneratedPlusAddressedUsernameResult -> {
handleUpdatePlusAddressedGeneratedUsernameResult(action)
}
@ -676,7 +676,7 @@ class GeneratorViewModel @Inject constructor(
}
private fun handleUpdatePlusAddressedGeneratedUsernameResult(
action: GeneratorAction.Internal.UpdateGeneratedPlusAddessedUsernameResult,
action: GeneratorAction.Internal.UpdateGeneratedPlusAddressedUsernameResult,
) {
when (val result = action.result) {
is GeneratedPlusAddressedUsernameResult.Success -> {
@ -809,7 +809,7 @@ class GeneratorViewModel @Inject constructor(
handleMinSpecialChange(action)
}
is GeneratorAction.MainType.Password.ToggleAvoidAmbigousCharactersChange -> {
is GeneratorAction.MainType.Password.ToggleAvoidAmbiguousCharactersChange -> {
handleToggleAmbiguousChars(action)
}
}
@ -895,7 +895,7 @@ class GeneratorViewModel @Inject constructor(
}
private fun handleToggleAmbiguousChars(
action: GeneratorAction.MainType.Password.ToggleAvoidAmbigousCharactersChange,
action: GeneratorAction.MainType.Password.ToggleAvoidAmbiguousCharactersChange,
) {
updatePasswordType { currentPasswordType ->
currentPasswordType.copy(
@ -1440,7 +1440,7 @@ class GeneratorViewModel @Inject constructor(
email = plusAddressedEmail.email,
),
)
sendAction(GeneratorAction.Internal.UpdateGeneratedPlusAddessedUsernameResult(result))
sendAction(GeneratorAction.Internal.UpdateGeneratedPlusAddressedUsernameResult(result))
}
private suspend fun generateCatchAllEmail(catchAllEmail: CatchAllEmail) {
@ -2264,7 +2264,7 @@ sealed class GeneratorAction {
* @property avoidAmbiguousChars Flag indicating whether ambiguous characters
* should be avoided.
*/
data class ToggleAvoidAmbigousCharactersChange(
data class ToggleAvoidAmbiguousCharactersChange(
val avoidAmbiguousChars: Boolean,
) : Password()
}
@ -2519,7 +2519,7 @@ sealed class GeneratorAction {
/**
* Indicates a generated text update is received.
*/
data class UpdateGeneratedPlusAddessedUsernameResult(
data class UpdateGeneratedPlusAddressedUsernameResult(
val result: GeneratedPlusAddressedUsernameResult,
) : Internal()

View file

@ -82,7 +82,7 @@ data class PasswordHandlers(
},
onPasswordToggleAvoidAmbiguousCharsChange = { shouldAvoidAmbiguousChars ->
viewModel.trySendAction(
GeneratorAction.MainType.Password.ToggleAvoidAmbigousCharactersChange(
GeneratorAction.MainType.Password.ToggleAvoidAmbiguousCharactersChange(
avoidAmbiguousChars = shouldAvoidAmbiguousChars,
),
)

View file

@ -591,7 +591,7 @@ class GeneratorScreenTest : BaseComposeTest() {
verify {
viewModel.trySendAction(
GeneratorAction.MainType.Password.ToggleAvoidAmbigousCharactersChange(
GeneratorAction.MainType.Password.ToggleAvoidAmbiguousCharactersChange(
avoidAmbiguousChars = true,
),
)
@ -646,7 +646,7 @@ class GeneratorScreenTest : BaseComposeTest() {
),
)
viewModel.trySendAction(
GeneratorAction.MainType.Password.ToggleAvoidAmbigousCharactersChange(
GeneratorAction.MainType.Password.ToggleAvoidAmbiguousCharactersChange(
avoidAmbiguousChars = true,
),
)

View file

@ -1325,7 +1325,7 @@ class GeneratorViewModelTest : BaseViewModelTest() {
val avoidAmbiguousChars = true
viewModel.trySendAction(
GeneratorAction.MainType.Password.ToggleAvoidAmbigousCharactersChange(
GeneratorAction.MainType.Password.ToggleAvoidAmbiguousCharactersChange(
avoidAmbiguousChars = avoidAmbiguousChars,
),
)