diff --git a/apps/ssb.json b/apps/ssb.json index 95f9a0aa..4661196d 100644 --- a/apps/ssb.json +++ b/apps/ssb.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "🐌", - "previous": "&NniJybtFHDaypdljDj1kbGIpwU8T5lX9m7+bA1YTu+M=.sha256" + "previous": "&Hnfvxu/+f8Z3qbbn/6M5+E7ju/Cj6fxg7SEBwlTy23g=.sha256" } diff --git a/apps/ssb/tf-message.js b/apps/ssb/tf-message.js index 5701e75d..3840c1d4 100644 --- a/apps/ssb/tf-message.js +++ b/apps/ssb/tf-message.js @@ -323,13 +323,13 @@ ${JSON.stringify(mention, null, 2)} React - ${!content.root ? + ${(!content.root && this.message.rowid <= this.channel_unread) ? html` - + ` : undefined}
diff --git a/apps/ssb/tf-news.js b/apps/ssb/tf-news.js index 6645e940..39d400e9 100644 --- a/apps/ssb/tf-news.js +++ b/apps/ssb/tf-news.js @@ -181,11 +181,28 @@ class TfNewsElement extends LitElement { let final_messages = this.group_following( this.finalize_messages(messages_by_id) ); + let unread_rowid = -1; + for (let message of final_messages) { + if (message.rowid < this.channel_unread) { + console.log(message.rowid, this.channel_unread); + unread_rowid = message.rowid; + break; + } + } + console.log(unread_rowid); return html`