From 8f51eb63b0f79ff635bd64c93999bd11b4f75856 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Thu, 26 Dec 2024 19:36:04 -0500 Subject: [PATCH] ssb: More experimenting with the unread status strategy. --- apps/ssb.json | 2 +- apps/ssb/tf-app.js | 1 + apps/ssb/tf-news.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/ssb.json b/apps/ssb.json index 62252dac..0c320284 100644 --- a/apps/ssb.json +++ b/apps/ssb.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "🦀", - "previous": "&zCaET5zt2iWthUzrTd/BWqfmSjeFryuVru6FrlQJOBI=.sha256" + "previous": "&Us7cb8UfbwNoFVPQXDnGBdGDmxQwPdNwcNjaiai80YA=.sha256" } diff --git a/apps/ssb/tf-app.js b/apps/ssb/tf-app.js index 7108bcef..11e2f923 100644 --- a/apps/ssb/tf-app.js +++ b/apps/ssb/tf-app.js @@ -318,6 +318,7 @@ class TfElement extends LitElement { UNION SELECT '' AS channel, MAX(messages.rowid) AS rowid FROM messages JOIN json_each(?2) AS following ON messages.author = following.value + WHERE messages.content ->> 'type' = 'post' AND messages.content ->> 'root' IS NULL UNION SELECT '@' AS channel, MAX(messages.rowid) AS rowid FROM messages_fts(?3) JOIN messages ON messages.rowid = messages_fts.rowid diff --git a/apps/ssb/tf-news.js b/apps/ssb/tf-news.js index 33ef0db7..f559720f 100644 --- a/apps/ssb/tf-news.js +++ b/apps/ssb/tf-news.js @@ -210,7 +210,7 @@ class TfNewsElement extends LitElement { channel=${this.channel} channel_unread=${this.channel_unread} > - ${x.rowid == unread_rowid && x != final_messages[0] + ${x.rowid == unread_rowid ? html`