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,12 +182,14 @@ class TfMessageElement extends LitElement {
render_children() { render_children() {
let self = this; let self = this;
if (this.collapsed && this.message.child_messages?.length) { 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>`; return html`<input type="button" value=${this.message.child_messages?.length + ' More'} @click=${() => self.collapsed = false}></input>`;
} else { } 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>`)}`; 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>`)}`;
} }
} }
}
render() { render() {
let content = this.message?.content; let content = this.message?.content;