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
|
@ -78,7 +78,7 @@ export default class SearchResultTile extends React.Component<IProps> {
|
|||
highlights = this.props.searchHighlights;
|
||||
}
|
||||
|
||||
if (haveRendererForEvent(mxEv, this.context?.showHiddenEventsInTimeline)) {
|
||||
if (haveRendererForEvent(mxEv, this.context?.showHiddenEvents)) {
|
||||
// do we need a date separator since the last event?
|
||||
const prevEv = timeline[j - 1];
|
||||
// is this a continuation of the previous message?
|
||||
|
@ -87,7 +87,7 @@ export default class SearchResultTile extends React.Component<IProps> {
|
|||
shouldFormContinuation(
|
||||
prevEv,
|
||||
mxEv,
|
||||
this.context?.showHiddenEventsInTimeline,
|
||||
this.context?.showHiddenEvents,
|
||||
threadsEnabled,
|
||||
TimelineRenderingType.Search,
|
||||
);
|
||||
|
@ -102,7 +102,7 @@ export default class SearchResultTile extends React.Component<IProps> {
|
|||
!shouldFormContinuation(
|
||||
mxEv,
|
||||
nextEv,
|
||||
this.context?.showHiddenEventsInTimeline,
|
||||
this.context?.showHiddenEvents,
|
||||
threadsEnabled,
|
||||
TimelineRenderingType.Search,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue