fix(cc-dark-theme): fix ccdarktheme_switch_status option name
In some parts of the codebase we defined the option as
ccdarktheme_switch_enabled, but in practice we used the option as if it
was called ccdarktheme_switch_status.
Thus, this CL replaces references to the first name by the latter.
Change-Id: Ie8b371aed3632333b9d09e4bcac900ff49d8f188
diff --git a/docs/developers/add_feature.md b/docs/developers/add_feature.md
index 16ebcee..8e63748 100644
--- a/docs/developers/add_feature.md
+++ b/docs/developers/add_feature.md
@@ -40,7 +40,7 @@
between them by clicking a button/switch in the Community Console.
- Note that this option is only applied when the feature switch is turned
on.
-- The `ccdarktheme_switch_enabled` option is used to save whether the user
+- The `ccdarktheme_switch_status` option is used to save whether the user
manually enabled the dark theme or not by using the switch/button in the
Community Console.
- It is only applied when `ccdarktheme_mode` is set to `switch` and the
diff --git a/src/common/options/optionsPrototype.ts b/src/common/options/optionsPrototype.ts
index c42b696..a3c98e8 100644
--- a/src/common/options/optionsPrototype.ts
+++ b/src/common/options/optionsPrototype.ts
@@ -1,9 +1,4 @@
-import {
- Option,
- OptionContext,
- KillSwitchType,
- OptionConfig,
-} from './Option';
+import { Option, OptionContext, KillSwitchType, OptionConfig } from './Option';
const rawOptionConfigs = {
// Available options
@@ -148,7 +143,7 @@
},
// Internal options
- ccdarktheme_switch_enabled: {
+ ccdarktheme_switch_status: {
defaultValue: true,
context: OptionContext.Internal,
killSwitchType: KillSwitchType.Ignore,
@@ -247,7 +242,9 @@
options.map((option) => [option.codename, option]),
);
-export const optionCodenames = Object.keys(rawOptionConfigs) as OptionCodename[];
+export const optionCodenames = Object.keys(
+ rawOptionConfigs,
+) as OptionCodename[];
export type OptionCodename = keyof typeof rawOptionConfigs;
export type OptionsValues = {
diff --git a/src/common/options/specialOptions.json5 b/src/common/options/specialOptions.json5
index 37b69fa..b444c82 100644
--- a/src/common/options/specialOptions.json5
+++ b/src/common/options/specialOptions.json5
@@ -1,5 +1,5 @@
[
'profileindicatoralt_months',
'ccdarktheme_mode',
- 'ccdarktheme_switch_enabled',
+ 'ccdarktheme_switch_status',
]