mirror of
https://github.com/bitwarden/android.git
synced 2026-03-22 20:41:29 -05:00
Minor formatting an import cleanup (#3819)
This commit is contained in:
@@ -7,7 +7,6 @@ import com.bitwarden.crypto.HashPurpose
|
||||
import com.bitwarden.crypto.Kdf
|
||||
import com.x8bit.bitwarden.data.auth.datasource.disk.AuthDiskSource
|
||||
import com.x8bit.bitwarden.data.auth.datasource.disk.model.AccountJson
|
||||
import com.x8bit.bitwarden.data.auth.datasource.disk.model.AccountJson.Profile
|
||||
import com.x8bit.bitwarden.data.auth.datasource.disk.model.AccountTokensJson
|
||||
import com.x8bit.bitwarden.data.auth.datasource.disk.model.ForcePasswordResetReason
|
||||
import com.x8bit.bitwarden.data.auth.datasource.disk.model.UserStateJson
|
||||
@@ -1671,7 +1670,7 @@ class AuthRepositoryImpl(
|
||||
*/
|
||||
private suspend fun unlockVaultWithPasswordOnLoginSuccess(
|
||||
loginResponse: GetTokenResponseJson.Success,
|
||||
profile: Profile,
|
||||
profile: AccountJson.Profile,
|
||||
password: String?,
|
||||
): VaultUnlockResult? {
|
||||
// Attempt to unlock the vault with password if possible.
|
||||
@@ -1693,7 +1692,7 @@ class AuthRepositoryImpl(
|
||||
*/
|
||||
private suspend fun unlockVaultWithTdeOnLoginSuccess(
|
||||
loginResponse: GetTokenResponseJson.Success,
|
||||
profile: Profile,
|
||||
profile: AccountJson.Profile,
|
||||
deviceData: DeviceDataModel?,
|
||||
): VaultUnlockResult? {
|
||||
// Attempt to unlock the vault with auth request if possible.
|
||||
@@ -1743,7 +1742,7 @@ class AuthRepositoryImpl(
|
||||
*/
|
||||
private suspend fun unlockVaultWithTrustedDeviceUserDecryptionOptionsAndStoreKeys(
|
||||
options: TrustedDeviceUserDecryptionOptionsJson,
|
||||
profile: Profile,
|
||||
profile: AccountJson.Profile,
|
||||
privateKey: String,
|
||||
): VaultUnlockResult? {
|
||||
var vaultUnlockResult: VaultUnlockResult? = null
|
||||
|
||||
@@ -194,12 +194,12 @@ class LandingViewModel @Inject constructor(
|
||||
}
|
||||
|
||||
private fun handleCreateAccountClicked() {
|
||||
@Suppress("MaxLineLength")
|
||||
val navigationEvent = if (featureFlagManager.getFeatureFlag(key = FlagKey.EmailVerification)) {
|
||||
LandingEvent.NavigateToStartRegistration
|
||||
} else {
|
||||
LandingEvent.NavigateToCreateAccount
|
||||
}
|
||||
val navigationEvent =
|
||||
if (featureFlagManager.getFeatureFlag(key = FlagKey.EmailVerification)) {
|
||||
LandingEvent.NavigateToStartRegistration
|
||||
} else {
|
||||
LandingEvent.NavigateToCreateAccount
|
||||
}
|
||||
sendEvent(navigationEvent)
|
||||
}
|
||||
|
||||
|
||||
@@ -238,8 +238,8 @@ private fun StartRegistrationContent(
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
BitwardenTextField(
|
||||
label = stringResource(
|
||||
id = R.string.email_address,
|
||||
),
|
||||
id = R.string.email_address,
|
||||
),
|
||||
placeholder = stringResource(R.string.email_address_required),
|
||||
value = emailInput,
|
||||
onValueChange = handler.onEmailInputChange,
|
||||
@@ -422,6 +422,7 @@ private fun ReceiveMarketingEmailsSwitch(
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
val unsubscribeString = stringResource(id = R.string.unsubscribe)
|
||||
|
||||
@Suppress("MaxLineLength")
|
||||
val annotatedLinkString = createAnnotatedString(
|
||||
mainString = stringResource(id = R.string.get_advice_announcements_and_research_opportunities_from_bitwarden_in_your_inbox_unsubscribe_any_time),
|
||||
|
||||
@@ -117,11 +117,11 @@ class StartRegistrationViewModel @Inject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleOnboardingFeatureFlagUpdated(action: OnboardingFeatureFlagUpdated) {
|
||||
mutableStateFlow.update {
|
||||
it.copy(showNewOnboardingUi = action.newValue)
|
||||
private fun handleOnboardingFeatureFlagUpdated(action: OnboardingFeatureFlagUpdated) {
|
||||
mutableStateFlow.update {
|
||||
it.copy(showNewOnboardingUi = action.newValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleServerGeologyHelpClick() {
|
||||
sendEvent(StartRegistrationEvent.NavigateToServerSelectionInfo)
|
||||
|
||||
@@ -278,9 +278,9 @@ class CompleteRegistrationScreenTest : BaseComposeTest() {
|
||||
.performScrollTo()
|
||||
.performClick()
|
||||
|
||||
verify {
|
||||
viewModel.trySendAction(CompleteRegistrationAction.LearnToPreventLockoutClick)
|
||||
}
|
||||
verify {
|
||||
viewModel.trySendAction(CompleteRegistrationAction.LearnToPreventLockoutClick)
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("MaxLineLength")
|
||||
|
||||
@@ -50,6 +50,7 @@ class StartRegistrationViewModelTest : BaseViewModelTest() {
|
||||
every { getFeatureFlag(FlagKey.OnboardingFlow) } returns false
|
||||
every { getFeatureFlagFlow(FlagKey.OnboardingFlow) } returns mutableFeatureFlagFlow
|
||||
}
|
||||
|
||||
/**
|
||||
* Saved state handle that has valid inputs. Useful for tests that want to test things
|
||||
* after the user has entered all valid inputs.
|
||||
|
||||
Reference in New Issue
Block a user