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:
parent
f27386ec37
commit
7335b35fbb
20 changed files with 120 additions and 54 deletions
|
@ -110,7 +110,9 @@ export default class ReplyTile extends React.PureComponent<IProps> {
|
|||
const msgType = mxEvent.getContent().msgtype;
|
||||
const evType = mxEvent.getType() as EventType;
|
||||
|
||||
const { hasRenderer, isInfoMessage, isSeeingThroughMessageHiddenForModeration } = getEventDisplayInfo(mxEvent);
|
||||
const {
|
||||
hasRenderer, isInfoMessage, isSeeingThroughMessageHiddenForModeration,
|
||||
} = getEventDisplayInfo(mxEvent, false /* Replies are never hidden, so this should be fine */);
|
||||
// This shouldn't happen: the caller should check we support this type
|
||||
// before trying to instantiate us
|
||||
if (!hasRenderer) {
|
||||
|
@ -177,7 +179,7 @@ export default class ReplyTile extends React.PureComponent<IProps> {
|
|||
highlightLink: this.props.highlightLink,
|
||||
onHeightChanged: this.props.onHeightChanged,
|
||||
permalinkCreator: this.props.permalinkCreator,
|
||||
}) }
|
||||
}, false /* showHiddenEvents shouldn't be relevant */) }
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue