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
|
@ -407,7 +407,7 @@ export default class HTMLExporter extends Exporter {
|
|||
total: events.length,
|
||||
}), false, true);
|
||||
if (this.cancelled) return this.cleanUp();
|
||||
if (!haveRendererForEvent(event)) continue;
|
||||
if (!haveRendererForEvent(event, false)) continue;
|
||||
|
||||
content += this.needsDateSeparator(event, prevEvent) ? this.getDateSeparator(event) : "";
|
||||
const shouldBeJoined = !this.needsDateSeparator(event, prevEvent) &&
|
||||
|
|
|
@ -85,7 +85,7 @@ export default class JSONExporter extends Exporter {
|
|||
total: events.length,
|
||||
}), false, true);
|
||||
if (this.cancelled) return this.cleanUp();
|
||||
if (!haveRendererForEvent(event)) continue;
|
||||
if (!haveRendererForEvent(event, false)) continue;
|
||||
this.messages.push(await this.getJSONString(event));
|
||||
}
|
||||
return this.createJSONString();
|
||||
|
|
|
@ -112,7 +112,7 @@ export default class PlainTextExporter extends Exporter {
|
|||
total: events.length,
|
||||
}), false, true);
|
||||
if (this.cancelled) return this.cleanUp();
|
||||
if (!haveRendererForEvent(event)) continue;
|
||||
if (!haveRendererForEvent(event, false)) continue;
|
||||
const textForEvent = await this.plainTextForEvent(event);
|
||||
content += textForEvent && `${new Date(event.getTs()).toLocaleString()} - ${textForEvent}\n`;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue