Allow Message formatting to be turned off when experiments are disabled #567

Merged
dan merged 1 commits from pt_BR into trunk 2022-11-27 03:09:27 +00:00
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;