Avoid looking up settings during timeline rendering (#8313)

* Avoid showHiddenEventsInTimeline lookups

* Avoid MSC3531 feature lookups

* Test that showHiddenEventsInTimeline doesn't get looked up while
rendering

* Fix code review nits

Co-authored-by: Travis Ralston <travisr@matrix.org>
This commit is contained in:
Robin 2022-04-14 19:23:22 -04:00 committed by GitHub
parent f27386ec37
commit 7335b35fbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 120 additions and 54 deletions

View file

@ -187,6 +187,8 @@ export const SETTINGS: {[setting: string]: ISetting} = {
"feature_msc3531_hide_messages_pending_moderation": {
isFeature: true,
labsGroup: LabGroup.Moderation,
// Requires a reload since this setting is cached in EventUtils
controller: new ReloadOnChangeController(),
displayName: _td("Let moderators hide messages pending moderation."),
supportedLevels: LEVELS_FEATURE,
default: false,