@@ -6,6 +6,7 @@ import { createWebsocketResponse } from '../websocketActions';
66interface State {
77 forced : boolean ;
88 showGemThreshold : number ;
9+ showThemeThreshold : number ;
910}
1011
1112const ENABLED = 1.0 ;
@@ -14,12 +15,14 @@ const DISABLED = -1.0;
1415const initialState : State = {
1516 forced : false ,
1617 showGemThreshold : DISABLED ,
18+ showThemeThreshold : DISABLED ,
1719} ;
1820
1921const { action : wsFeatureFlags , schema : wsFeatureFlagsSchema } = createWebsocketResponse (
2022 'featureFlags' ,
2123 z . object ( {
2224 showGemThreshold : z . number ( ) . nullish ( ) ,
25+ showThemeThreshold : z . number ( ) . nullish ( ) ,
2326 } ) ,
2427) ;
2528
@@ -30,10 +33,12 @@ const slice = createSlice({
3033 forceEnableAll : ( state ) => {
3134 state . forced = true ;
3235 state . showGemThreshold = ENABLED ;
36+ state . showThemeThreshold = ENABLED ;
3337 } ,
3438 forceDisableAll : ( state ) => {
3539 state . forced = true ;
3640 state . showGemThreshold = DISABLED ;
41+ state . showThemeThreshold = DISABLED ;
3742 } ,
3843 } ,
3944 extraReducers : ( builder ) => {
@@ -42,11 +47,15 @@ const slice = createSlice({
4247 return ;
4348 }
4449
45- const { showGemThreshold } = action . payload ;
50+ const { showGemThreshold, showThemeThreshold } = action . payload ;
4651
4752 if ( showGemThreshold ) {
4853 state . showGemThreshold = showGemThreshold ;
4954 }
55+
56+ if ( showThemeThreshold ) {
57+ state . showThemeThreshold = showThemeThreshold ;
58+ }
5059 } ) ;
5160 } ,
5261} ) ;
0 commit comments