diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/AccountSecurityScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/AccountSecurityScreen.kt index f1081084a..8a906f81b 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/AccountSecurityScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/AccountSecurityScreen.kt @@ -1,5 +1,7 @@ package com.x8bit.bitwarden.ui.platform.feature.settings.accountsecurity +import android.Manifest +import android.os.Build import android.widget.Toast import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer @@ -30,8 +32,6 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import androidx.core.net.toUri import androidx.hilt.navigation.compose.hiltViewModel -import android.Manifest -import android.os.Build import com.x8bit.bitwarden.R import com.x8bit.bitwarden.data.platform.repository.model.VaultTimeout import com.x8bit.bitwarden.data.platform.repository.model.VaultTimeoutAction diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/AutoFillScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/AutoFillScreen.kt index bfb0f0634..d8bdfe3a4 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/AutoFillScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/AutoFillScreen.kt @@ -72,6 +72,7 @@ fun AutoFillScreen( is AutoFillEvent.ShowToast -> { Toast.makeText(context, event.text(resources), Toast.LENGTH_SHORT).show() } + AutoFillEvent.NavigateToBlockAutoFill -> { onNavigateToBlockAutoFillScreen() } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/blockautofill/BlockAutoFillScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/blockautofill/BlockAutoFillScreen.kt index df672bcf2..abbf83b22 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/blockautofill/BlockAutoFillScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/autofill/blockautofill/BlockAutoFillScreen.kt @@ -60,7 +60,7 @@ fun BlockAutoFillScreen( }, ) { innerPadding -> Column( - modifier = Modifier + modifier = Modifier .padding(innerPadding) .fillMaxSize() .verticalScroll(rememberScrollState()), diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/BitwardenTheme.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/BitwardenTheme.kt index 6a3a2a8c3..f74dac47b 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/BitwardenTheme.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/BitwardenTheme.kt @@ -22,9 +22,9 @@ import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalView import androidx.core.view.WindowCompat import com.x8bit.bitwarden.R +import com.x8bit.bitwarden.ui.platform.feature.settings.appearance.model.AppTheme import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManager import com.x8bit.bitwarden.ui.platform.manager.intent.IntentManagerImpl -import com.x8bit.bitwarden.ui.platform.feature.settings.appearance.model.AppTheme import com.x8bit.bitwarden.ui.platform.manager.permissions.PermissionsManager import com.x8bit.bitwarden.ui.platform.manager.permissions.PermissionsManagerImpl diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditItemContent.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditItemContent.kt index f87bf18c5..39bf27151 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditItemContent.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditItemContent.kt @@ -12,9 +12,9 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import com.x8bit.bitwarden.R -import com.x8bit.bitwarden.ui.platform.manager.permissions.PermissionsManager import com.x8bit.bitwarden.ui.platform.components.BitwardenListHeaderText import com.x8bit.bitwarden.ui.platform.components.BitwardenMultiSelectButton +import com.x8bit.bitwarden.ui.platform.manager.permissions.PermissionsManager import com.x8bit.bitwarden.ui.vault.feature.addedit.handlers.VaultAddEditCardTypeHandlers import com.x8bit.bitwarden.ui.vault.feature.addedit.handlers.VaultAddEditCommonHandlers import com.x8bit.bitwarden.ui.vault.feature.addedit.handlers.VaultAddEditIdentityTypeHandlers diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModel.kt index 0289267aa..044849e35 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModel.kt @@ -905,6 +905,7 @@ class VaultAddEditViewModel @Inject constructor( ) } } + is GeneratorResult.Username -> { updateLoginContent { loginType -> loginType.copy( diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/util/CipherViewExtensions.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/util/CipherViewExtensions.kt index a02c505a0..3fe991699 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/util/CipherViewExtensions.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/util/CipherViewExtensions.kt @@ -40,6 +40,7 @@ fun CipherView.toViewState(): VaultAddEditState.ViewState = expirationYear = card?.expYear.orEmpty(), securityCode = card?.code.orEmpty(), ) + CipherType.IDENTITY -> VaultAddEditState.ViewState.Content.ItemType.Identity( selectedTitle = identity?.title.toTitleOrDefault(), firstName = identity?.firstName.orEmpty(), diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationNavigation.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationNavigation.kt index fe5bb396f..2cc2d5e66 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationNavigation.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationNavigation.kt @@ -49,8 +49,8 @@ fun NavController.navigateToVaultMoveToOrganization( vaultItemId: String, navOptions: NavOptions? = null, ) { - navigate( - route = "$VAULT_MOVE_TO_ORGANIZATION_PREFIX/$vaultItemId", - navOptions = navOptions, - ) + navigate( + route = "$VAULT_MOVE_TO_ORGANIZATION_PREFIX/$vaultItemId", + navOptions = navOptions, + ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/util/VaultMoveToOrganizationViewExtensions.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/util/VaultMoveToOrganizationViewExtensions.kt index e85374edb..5e87bb334 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/util/VaultMoveToOrganizationViewExtensions.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/util/VaultMoveToOrganizationViewExtensions.kt @@ -26,6 +26,7 @@ fun Triple, UserState?>.toViewState(): (currentCipher == null) -> { VaultMoveToOrganizationState.ViewState.Error(R.string.generic_error_message.asText()) } + (userOrganizations?.isNotEmpty() == true) -> { VaultMoveToOrganizationState.ViewState.Content( selectedOrganizationId = currentCipher @@ -58,6 +59,7 @@ fun Triple, UserState?>.toViewState(): cipherToMove = currentCipher, ) } + else -> VaultMoveToOrganizationState.ViewState.Empty } } diff --git a/app/src/test/java/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryTest.kt b/app/src/test/java/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryTest.kt index baaaa2624..cb648a57c 100644 --- a/app/src/test/java/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/data/vault/repository/VaultRepositoryTest.kt @@ -23,9 +23,9 @@ import com.x8bit.bitwarden.data.platform.repository.util.bufferedMutableSharedFl import com.x8bit.bitwarden.data.platform.util.asFailure import com.x8bit.bitwarden.data.platform.util.asSuccess import com.x8bit.bitwarden.data.vault.datasource.disk.VaultDiskSource -import com.x8bit.bitwarden.data.vault.datasource.network.model.ShareCipherJsonRequest import com.x8bit.bitwarden.data.vault.datasource.network.model.SendFileResponseJson import com.x8bit.bitwarden.data.vault.datasource.network.model.SendTypeJson +import com.x8bit.bitwarden.data.vault.datasource.network.model.ShareCipherJsonRequest import com.x8bit.bitwarden.data.vault.datasource.network.model.SyncResponseJson import com.x8bit.bitwarden.data.vault.datasource.network.model.UpdateCipherResponseJson import com.x8bit.bitwarden.data.vault.datasource.network.model.UpdateSendResponseJson diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/addedit/model/CustomFieldTypeTests.kt b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/addedit/model/CustomFieldTypeTests.kt index 00e3f4341..630950408 100644 --- a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/addedit/model/CustomFieldTypeTests.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/addedit/model/CustomFieldTypeTests.kt @@ -76,7 +76,11 @@ class CustomFieldTypeTests { val type = CustomFieldType.LINKED val expected = - VaultAddEditState.Custom.LinkedField(TEST_ID, "test", VaultLinkedFieldType.CARDHOLDER_NAME) + VaultAddEditState.Custom.LinkedField( + TEST_ID, + "test", + VaultLinkedFieldType.CARDHOLDER_NAME, + ) val actual = type.toCustomField( name = name, itemType = VaultAddEditState.ViewState.Content.ItemType.Card(), diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationViewModelTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationViewModelTest.kt index 3c1ee79c0..cbb3a5a4a 100644 --- a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationViewModelTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationViewModelTest.kt @@ -180,7 +180,8 @@ class VaultMoveToOrganizationViewModelTest : BaseViewModelTest() { organizations = createMockOrganizationList(), selectedOrganizationId = "mockOrganizationId-1", cipherToMove = createMockCipherView(number = 1), - ), dialogState = null, + ), + dialogState = null, ), awaitItem(), )