mirror of
https://github.com/bitwarden/android.git
synced 2026-05-21 03:21:29 -05:00
PM-34228: feat: Add feature flag for forthcoming attachment updates (#6739)
This commit is contained in:
@@ -38,6 +38,7 @@ sealed class FlagKey<out T : Any> {
|
||||
ArchiveItems,
|
||||
SendEmailVerification,
|
||||
MobilePremiumUpgrade,
|
||||
AttachmentUpdates,
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -116,6 +117,14 @@ sealed class FlagKey<out T : Any> {
|
||||
override val defaultValue: Boolean = false
|
||||
}
|
||||
|
||||
/**
|
||||
* Data object holding the feature flag key for the Attachment Feature Updates.
|
||||
*/
|
||||
data object AttachmentUpdates : FlagKey<Boolean>() {
|
||||
override val keyName: String = "pm-34224-mobile-attachment-updates"
|
||||
override val defaultValue: Boolean = false
|
||||
}
|
||||
|
||||
//region Dummy keys for testing
|
||||
/**
|
||||
* Data object holding the key for a [Boolean] flag to be used in tests.
|
||||
|
||||
@@ -40,6 +40,10 @@ class FlagKeyTest {
|
||||
FlagKey.MobilePremiumUpgrade.keyName,
|
||||
"PM-31697-premium-upgrade-path",
|
||||
)
|
||||
assertEquals(
|
||||
FlagKey.AttachmentUpdates.keyName,
|
||||
"pm-34224-mobile-attachment-updates",
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -54,6 +58,7 @@ class FlagKeyTest {
|
||||
FlagKey.ArchiveItems,
|
||||
FlagKey.SendEmailVerification,
|
||||
FlagKey.MobilePremiumUpgrade,
|
||||
FlagKey.AttachmentUpdates,
|
||||
).all {
|
||||
!it.defaultValue
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user