mirror of
https://github.com/bitwarden/android.git
synced 2024-11-23 18:06:08 +03:00
Update various import and formatting issues (#689)
This commit is contained in:
parent
eeb22dbfee
commit
c487074de6
12 changed files with 22 additions and 12 deletions
|
@ -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
|
||||
|
|
|
@ -72,6 +72,7 @@ fun AutoFillScreen(
|
|||
is AutoFillEvent.ShowToast -> {
|
||||
Toast.makeText(context, event.text(resources), Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
||||
AutoFillEvent.NavigateToBlockAutoFill -> {
|
||||
onNavigateToBlockAutoFillScreen()
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ fun BlockAutoFillScreen(
|
|||
},
|
||||
) { innerPadding ->
|
||||
Column(
|
||||
modifier = Modifier
|
||||
modifier = Modifier
|
||||
.padding(innerPadding)
|
||||
.fillMaxSize()
|
||||
.verticalScroll(rememberScrollState()),
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -905,6 +905,7 @@ class VaultAddEditViewModel @Inject constructor(
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
is GeneratorResult.Username -> {
|
||||
updateLoginContent { loginType ->
|
||||
loginType.copy(
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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,
|
||||
)
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ fun Triple<CipherView?, List<CollectionView>, 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<CipherView?, List<CollectionView>, UserState?>.toViewState():
|
|||
cipherToMove = currentCipher,
|
||||
)
|
||||
}
|
||||
|
||||
else -> VaultMoveToOrganizationState.ViewState.Empty
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -180,7 +180,8 @@ class VaultMoveToOrganizationViewModelTest : BaseViewModelTest() {
|
|||
organizations = createMockOrganizationList(),
|
||||
selectedOrganizationId = "mockOrganizationId-1",
|
||||
cipherToMove = createMockCipherView(number = 1),
|
||||
), dialogState = null,
|
||||
),
|
||||
dialogState = null,
|
||||
),
|
||||
awaitItem(),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue