Minor formatting an import cleanup (#3819)

This commit is contained in:
David Perez 2024-08-23 10:49:59 -05:00 committed by GitHub
parent 09f497ca9b
commit 162da64567
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 20 additions and 19 deletions

View file

@ -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

View file

@ -194,8 +194,8 @@ class LandingViewModel @Inject constructor(
}
private fun handleCreateAccountClicked() {
@Suppress("MaxLineLength")
val navigationEvent = if (featureFlagManager.getFeatureFlag(key = FlagKey.EmailVerification)) {
val navigationEvent =
if (featureFlagManager.getFeatureFlag(key = FlagKey.EmailVerification)) {
LandingEvent.NavigateToStartRegistration
} else {
LandingEvent.NavigateToCreateAccount

View file

@ -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),

View file

@ -117,11 +117,11 @@ class StartRegistrationViewModel @Inject constructor(
}
}
private fun handleOnboardingFeatureFlagUpdated(action: OnboardingFeatureFlagUpdated) {
private fun handleOnboardingFeatureFlagUpdated(action: OnboardingFeatureFlagUpdated) {
mutableStateFlow.update {
it.copy(showNewOnboardingUi = action.newValue)
}
}
}
private fun handleServerGeologyHelpClick() {
sendEvent(StartRegistrationEvent.NavigateToServerSelectionInfo)

View file

@ -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.