File tree 4 files changed +12
-0
lines changed
debug/java/im/vector/app/features/debug/features
main/java/im/vector/app/features 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(
80
80
key = DebugFeatureKeys .startDmOnFirstMsg,
81
81
factory = VectorFeatures ::shouldStartDmOnFirstMessage
82
82
),
83
+ createBooleanFeature(
84
+ label = " Enable New App Layout" ,
85
+ key = DebugFeatureKeys .newAppLayoutEnabled,
86
+ factory = VectorFeatures ::isNewAppLayoutEnabled
87
+ ),
83
88
)
84
89
)
85
90
}
Original file line number Diff line number Diff line change @@ -72,6 +72,9 @@ class DebugVectorFeatures(
72
72
override fun shouldStartDmOnFirstMessage (): Boolean = read(DebugFeatureKeys .startDmOnFirstMsg)
73
73
? : vectorFeatures.shouldStartDmOnFirstMessage()
74
74
75
+ override fun isNewAppLayoutEnabled (): Boolean = read(DebugFeatureKeys .newAppLayoutEnabled)
76
+ ? : vectorFeatures.isNewAppLayoutEnabled()
77
+
75
78
fun <T > override (value : T ? , key : Preferences .Key <T >) = updatePreferences {
76
79
if (value == null ) {
77
80
it.remove(key)
@@ -131,4 +134,5 @@ object DebugFeatureKeys {
131
134
val screenSharing = booleanPreferencesKey(" screen-sharing" )
132
135
val forceUsageOfOpusEncoder = booleanPreferencesKey(" force-usage-of-opus-encoder" )
133
136
val startDmOnFirstMsg = booleanPreferencesKey(" start-dm-on-first-msg" )
137
+ val newAppLayoutEnabled = booleanPreferencesKey(" new-app-layout-enabled" )
134
138
}
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ interface VectorFeatures {
32
32
fun isScreenSharingEnabled (): Boolean
33
33
fun forceUsageOfOpusEncoder (): Boolean
34
34
fun shouldStartDmOnFirstMessage (): Boolean
35
+ fun isNewAppLayoutEnabled (): Boolean
35
36
36
37
enum class OnboardingVariant {
37
38
LEGACY ,
@@ -52,4 +53,5 @@ class DefaultVectorFeatures : VectorFeatures {
52
53
override fun isScreenSharingEnabled (): Boolean = true
53
54
override fun forceUsageOfOpusEncoder (): Boolean = false
54
55
override fun shouldStartDmOnFirstMessage (): Boolean = false
56
+ override fun isNewAppLayoutEnabled (): Boolean = false
55
57
}
You can’t perform that action at this time.
0 commit comments