ssb: Off by one on the unread line.

This commit is contained in:
Cory McWilliams 2024-12-18 12:46:02 -05:00
parent 53717076f5
commit f28386b71f
2 changed files with 12 additions and 11 deletions

View File

@ -1,5 +1,5 @@
{ {
"type": "tildefriends-app", "type": "tildefriends-app",
"emoji": "🐌", "emoji": "🐌",
"previous": "&5mQzvcGxx+TD4O8INR+KPO6dxbb+7p8IchL44TWSrgE=.sha256" "previous": "&pySy2RopLJGGrJRpoyzKM7zDzQUCxRXLuE62kS4C5s4=.sha256"
} }

View File

@ -201,6 +201,16 @@ class TfNewsElement extends LitElement {
${final_messages.map( ${final_messages.map(
(x) => (x) =>
html` html`
<tf-message
.message=${x}
whoami=${this.whoami}
.users=${this.users}
.drafts=${this.drafts}
.expanded=${this.expanded}
collapsed="true"
channel=${this.channel}
channel_unread=${this.channel_unread}
></tf-message>
${x.rowid == unread_rowid && x != final_messages[0] ${x.rowid == unread_rowid && x != final_messages[0]
? html`<div style="display: flex; flex-direction: row"> ? html`<div style="display: flex; flex-direction: row">
<div <div
@ -212,16 +222,7 @@ class TfNewsElement extends LitElement {
></div> ></div>
</div>` </div>`
: undefined} : undefined}
<tf-message `
.message=${x}
whoami=${this.whoami}
.users=${this.users}
.drafts=${this.drafts}
.expanded=${this.expanded}
collapsed="true"
channel=${this.channel}
channel_unread=${this.channel_unread}
></tf-message>`
)} )}
</div> </div>
`; `;