ssb: Tried to do the right lit things to prevent unnecessary re-rendering. Ended up doing a lazy JSON thing.

This commit is contained in:
2025-01-11 14:09:42 -05:00
parent 02759c6f83
commit aa15da50ab
5 changed files with 17 additions and 12 deletions

View File

@ -1,4 +1,4 @@
import {LitElement, html, unsafeHTML, until} from './lit-all.min.js';
import {LitElement, html, unsafeHTML, repeat, until} from './lit-all.min.js';
import * as tfrpc from '/static/tfrpc.js';
import {styles} from './tf-styles.js';
@ -198,7 +198,9 @@ class TfNewsElement extends LitElement {
}
return html`
<div>
${final_messages.map(
${repeat(
final_messages,
(x) => x.id,
(x) => html`
<tf-message
.message=${x}