mirror of
https://github.com/bitwarden/android.git
synced 2026-02-03 18:17:54 -06:00
[PM-31613] Add send email verification feature flag (#6470)
This commit is contained in:
parent
4cac4d6a6e
commit
b0eea88af2
@ -37,6 +37,7 @@ sealed class FlagKey<out T : Any> {
|
||||
NoLogoutOnKdfChange,
|
||||
MigrateMyVaultToMyItems,
|
||||
ArchiveItems,
|
||||
SendEmailVerification,
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -107,6 +108,14 @@ sealed class FlagKey<out T : Any> {
|
||||
override val defaultValue: Boolean = false
|
||||
}
|
||||
|
||||
/**
|
||||
* Data object holding the feature flag key for the Send Email Verification feature.
|
||||
*/
|
||||
data object SendEmailVerification : FlagKey<Boolean>() {
|
||||
override val keyName: String = "pm-19051-send-email-verification"
|
||||
override val defaultValue: Boolean = false
|
||||
}
|
||||
|
||||
//region Dummy keys for testing
|
||||
/**
|
||||
* Data object holding the key for a [Boolean] flag to be used in tests.
|
||||
|
||||
@ -36,6 +36,10 @@ class FlagKeyTest {
|
||||
FlagKey.ArchiveItems.keyName,
|
||||
"pm-19148-innovation-archive",
|
||||
)
|
||||
assertEquals(
|
||||
FlagKey.SendEmailVerification.keyName,
|
||||
"pm-19051-send-email-verification",
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -49,6 +53,7 @@ class FlagKeyTest {
|
||||
FlagKey.ForceUpdateKdfSettings,
|
||||
FlagKey.MigrateMyVaultToMyItems,
|
||||
FlagKey.ArchiveItems,
|
||||
FlagKey.SendEmailVerification,
|
||||
).all {
|
||||
!it.defaultValue
|
||||
},
|
||||
|
||||
@ -31,6 +31,7 @@ fun <T : Any> FlagKey<T>.ListItemContent(
|
||||
FlagKey.NoLogoutOnKdfChange,
|
||||
FlagKey.MigrateMyVaultToMyItems,
|
||||
FlagKey.ArchiveItems,
|
||||
FlagKey.SendEmailVerification,
|
||||
-> {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
BooleanFlagItem(
|
||||
@ -83,4 +84,5 @@ private fun <T : Any> FlagKey<T>.getDisplayLabel(): String = when (this) {
|
||||
|
||||
FlagKey.MigrateMyVaultToMyItems -> stringResource(BitwardenString.migrate_my_vault_to_my_items)
|
||||
FlagKey.ArchiveItems -> stringResource(BitwardenString.archive_items)
|
||||
FlagKey.SendEmailVerification -> stringResource(BitwardenString.send_email_verification)
|
||||
}
|
||||
|
||||
@ -40,6 +40,7 @@
|
||||
<string name="avoid_logout_on_kdf_change">Avoid logout on KDF change</string>
|
||||
<string name="migrate_my_vault_to_my_items">Migrate My Vault to My Items</string>
|
||||
<string name="archive_items">Archive Items</string>
|
||||
<string name="send_email_verification">Send Email Verification</string>
|
||||
|
||||
<!-- endregion Debug Menu -->
|
||||
</resources>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user