From 84856a5c2910c378e6e930b250c50eb469befb22 Mon Sep 17 00:00:00 2001 From: joshua-livefront <139182194+joshua-livefront@users.noreply.github.com> Date: Tue, 3 Oct 2023 15:55:27 -0400 Subject: [PATCH] BIT-722: Adding generator navigation to the nav bar (#83) --- .../feature/vaultunlockednavbar/VaultUnlockedNavBarScreen.kt | 3 ++- .../bitwarden/ui/tools/feature/generator/GeneratorViewModel.kt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/vaultunlockednavbar/VaultUnlockedNavBarScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/vaultunlockednavbar/VaultUnlockedNavBarScreen.kt index add74e026..6d6d01edd 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/vaultunlockednavbar/VaultUnlockedNavBarScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/vaultunlockednavbar/VaultUnlockedNavBarScreen.kt @@ -28,6 +28,7 @@ import androidx.navigation.navOptions import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.base.util.EventsEffect import com.x8bit.bitwarden.ui.platform.components.PlaceholderComposable +import com.x8bit.bitwarden.ui.tools.feature.generator.GeneratorScreen import com.x8bit.bitwarden.ui.vault.feature.vault.VAULT_ROUTE import com.x8bit.bitwarden.ui.vault.feature.vault.navigateToVault import com.x8bit.bitwarden.ui.vault.feature.vault.vaultDestination @@ -283,7 +284,7 @@ private const val GENERATOR_ROUTE = "generator" */ private fun NavGraphBuilder.generatorDestination() { composable(GENERATOR_ROUTE) { - PlaceholderComposable(text = "Generator") + GeneratorScreen() } } 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 32af6819a..2091d53b9 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 @@ -237,7 +237,8 @@ class GeneratorViewModel @Inject constructor( val INITIAL_STATE: GeneratorState = GeneratorState( generatedText = PLACEHOLDER_GENERATED_TEXT, selectedType = Passcode( - selectedType = Password(), + // TODO (BIT-634): Update the initial state to Password + selectedType = Passphrase(), ), ) }