Allow Message formatting to be turned off when experiments are disabled
continuous-integration/drone/pr Build is running Details
continuous-integration/drone/push Build is pending Details

Fix: #549
This commit is contained in:
Sarah Jamie Lewis 2022-11-23 08:32:16 -08:00
parent daa0e65070
commit b282ace9c3
1 changed files with 9 additions and 3 deletions

View File

@ -95,10 +95,16 @@ class Settings extends ChangeNotifier {
}
}
// If message formatting has not explicitly been turned off, then
// turn it on by default.
// allow message formatting to be turned off even when experiments are
// disabled...
if (experiment == FormattingExperiment) {
return true;
if (this.experiments.containsKey(FormattingExperiment)) {
// If message formatting has not explicitly been turned off, then
// turn it on by default (even when experiments are disabled)
return this.experiments[experiment]! == true;
} else {
return true; // enable by default
}
}
return false;