File tree Expand file tree Collapse file tree 4 files changed +12
-0
lines changed
debug/java/im/vector/app/features/debug/features
main/java/im/vector/app/features Expand file tree Collapse file tree 4 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 1+ Adds NewAppLayoutEnabled feature flag
Original file line number Diff line number Diff line change @@ -80,6 +80,11 @@ class DebugFeaturesStateFactory @Inject constructor(
8080 key = DebugFeatureKeys .startDmOnFirstMsg,
8181 factory = VectorFeatures ::shouldStartDmOnFirstMessage
8282 ),
83+ createBooleanFeature(
84+ label = " Enable New App Layout" ,
85+ key = DebugFeatureKeys .newAppLayoutEnabled,
86+ factory = VectorFeatures ::isNewAppLayoutEnabled
87+ ),
8388 )
8489 )
8590 }
Original file line number Diff line number Diff line change @@ -72,6 +72,9 @@ class DebugVectorFeatures(
7272 override fun shouldStartDmOnFirstMessage (): Boolean = read(DebugFeatureKeys .startDmOnFirstMsg)
7373 ? : vectorFeatures.shouldStartDmOnFirstMessage()
7474
75+ override fun isNewAppLayoutEnabled (): Boolean = read(DebugFeatureKeys .newAppLayoutEnabled)
76+ ? : vectorFeatures.isNewAppLayoutEnabled()
77+
7578 fun <T > override (value : T ? , key : Preferences .Key <T >) = updatePreferences {
7679 if (value == null ) {
7780 it.remove(key)
@@ -131,4 +134,5 @@ object DebugFeatureKeys {
131134 val screenSharing = booleanPreferencesKey(" screen-sharing" )
132135 val forceUsageOfOpusEncoder = booleanPreferencesKey(" force-usage-of-opus-encoder" )
133136 val startDmOnFirstMsg = booleanPreferencesKey(" start-dm-on-first-msg" )
137+ val newAppLayoutEnabled = booleanPreferencesKey(" new-app-layout-enabled" )
134138}
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ interface VectorFeatures {
3232 fun isScreenSharingEnabled (): Boolean
3333 fun forceUsageOfOpusEncoder (): Boolean
3434 fun shouldStartDmOnFirstMessage (): Boolean
35+ fun isNewAppLayoutEnabled (): Boolean
3536
3637 enum class OnboardingVariant {
3738 LEGACY ,
@@ -52,4 +53,5 @@ class DefaultVectorFeatures : VectorFeatures {
5253 override fun isScreenSharingEnabled (): Boolean = true
5354 override fun forceUsageOfOpusEncoder (): Boolean = false
5455 override fun shouldStartDmOnFirstMessage (): Boolean = false
56+ override fun isNewAppLayoutEnabled (): Boolean = false
5557}
You can’t perform that action at this time.
0 commit comments