Missed a change.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4082 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2022-12-28 17:17:44 +00:00
parent c1015a8bdd
commit bb565aeb23

View File

@ -182,10 +182,12 @@ class TfMessageElement extends LitElement {
render_children() {
let self = this;
if (this.collapsed && this.message.child_messages?.length) {
return html`<input type="button" value=${this.message.child_messages?.length + ' More'} @click=${() => self.collapsed = false}></input>`;
} else {
return html`<input type="button" value="Collapse" @click=${() => self.collapsed = true}></input>${(this.message.child_messages || []).map(x => html`<tf-message .message=${x} whoami=${this.whoami} .users=${this.users}></tf-message>`)}`;
if (this.message.child_messages?.length) {
if (this.collapsed) {
return html`<input type="button" value=${this.message.child_messages?.length + ' More'} @click=${() => self.collapsed = false}></input>`;
} else {
return html`<input type="button" value="Collapse" @click=${() => self.collapsed = true}></input>${(this.message.child_messages || []).map(x => html`<tf-message .message=${x} whoami=${this.whoami} .users=${this.users}></tf-message>`)}`;
}
}
}