From 1b0bc13903f74b20636643d88fddc8608b8c22ae Mon Sep 17 00:00:00 2001 From: Dave Severns <149429124+dseverns-livefront@users.noreply.github.com> Date: Fri, 15 Nov 2024 11:32:09 -0500 Subject: [PATCH] Fix typos in generator actions (#4310) --- .../tools/feature/generator/GeneratorViewModel.kt | 14 +++++++------- .../feature/generator/handlers/PasswordHandlers.kt | 2 +- .../tools/feature/generator/GeneratorScreenTest.kt | 4 ++-- .../feature/generator/GeneratorViewModelTest.kt | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorViewModel.kt index 3be394188..c59dea833 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorViewModel.kt @@ -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() diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/handlers/PasswordHandlers.kt b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/handlers/PasswordHandlers.kt index 83c761f8f..e97d1f684 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/handlers/PasswordHandlers.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/tools/feature/generator/handlers/PasswordHandlers.kt @@ -82,7 +82,7 @@ data class PasswordHandlers( }, onPasswordToggleAvoidAmbiguousCharsChange = { shouldAvoidAmbiguousChars -> viewModel.trySendAction( - GeneratorAction.MainType.Password.ToggleAvoidAmbigousCharactersChange( + GeneratorAction.MainType.Password.ToggleAvoidAmbiguousCharactersChange( avoidAmbiguousChars = shouldAvoidAmbiguousChars, ), ) diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorScreenTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorScreenTest.kt index 0d8132adb..ea2959874 100644 --- a/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorScreenTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorScreenTest.kt @@ -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, ), ) diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorViewModelTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorViewModelTest.kt index 880deb9d5..5517f3edf 100644 --- a/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorViewModelTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorViewModelTest.kt @@ -1325,7 +1325,7 @@ class GeneratorViewModelTest : BaseViewModelTest() { val avoidAmbiguousChars = true viewModel.trySendAction( - GeneratorAction.MainType.Password.ToggleAvoidAmbigousCharactersChange( + GeneratorAction.MainType.Password.ToggleAvoidAmbiguousCharactersChange( avoidAmbiguousChars = avoidAmbiguousChars, ), )