diff --git a/src/components/RssFeedList/ArticleUrlsSection.tsx b/src/components/RssFeedList/ArticleUrlsSection.tsx index f88bd44f..8858cdf5 100644 --- a/src/components/RssFeedList/ArticleUrlsSection.tsx +++ b/src/components/RssFeedList/ArticleUrlsSection.tsx @@ -2,7 +2,14 @@ import type { ReactNode } from 'react' import { useTranslation } from 'react-i18next' /** Section chrome for the article-URL card list (Nostr threads + merged RSS by URL). */ -export function ArticleUrlsSection({ children }: { children: ReactNode }) { +export function ArticleUrlsSection({ + children, + subtitleKey = 'Article URLs subtitle' +}: { + children: ReactNode + /** `Article URLs Nostr manual subtitle` when the URLs toggle hides RSS-only URL groups. */ + subtitleKey?: string +}) { const { t } = useTranslation() return (
@@ -13,9 +20,7 @@ export function ArticleUrlsSection({ children }: { children: ReactNode }) { > {t('Article URLs')} -

- {t('Article URLs subtitle')} -

+

{t(subtitleKey)}

{children}
diff --git a/src/components/RssFeedList/index.tsx b/src/components/RssFeedList/index.tsx index df9da019..d347bcbb 100644 --- a/src/components/RssFeedList/index.tsx +++ b/src/components/RssFeedList/index.tsx @@ -566,7 +566,13 @@ export default function RssFeedList() { }, [rssWebItemsRespectingClutterPref, searchQuery, rssItemMatchesSearch, suppressClawstrLinks]) type CombinedFeedRow = - | { kind: 'web'; canonicalUrl: string; rssItems: TRssFeedItem[]; latestPub: number } + | { + kind: 'web' + canonicalUrl: string + rssItems: TRssFeedItem[] + latestPub: number + fromNostrOrManual: boolean + } | { kind: 'rss'; item: TRssFeedItem } type UnifiedFeedRow = @@ -655,8 +661,8 @@ export default function RssFeedList() { }, [combinedFeedRows, searchQuery, rssItemMatchesSearch]) /** - * URLs-only view: one card per grouped article URL (same rows as “Both”), including RSS-sourced URLs - * and full `rssItems` for titles/snippets — previously RSS-only rows were hidden and `rssItems` was cleared. + * URLs-only: Nostr/manual article URLs only (`fromNostrOrManual`), not URL cards that exist solely from RSS + * grouping. RSS-only timeline rows stay on the RSS toggle. Both: every web row plus RSS entries. */ const feedDisplayBase = useMemo((): | { view: 'rss'; items: TRssFeedItem[] } @@ -667,7 +673,10 @@ export default function RssFeedList() { if (feedScope === 'urls') { const rows: UnifiedFeedRow[] = combinedFeedRowsForSearch - .filter((r): r is Extract => r.kind === 'web') + .filter( + (r): r is Extract => + r.kind === 'web' && r.fromNostrOrManual + ) .map((r) => ({ kind: 'url' as const, canonicalUrl: r.canonicalUrl, @@ -1010,7 +1019,7 @@ export default function RssFeedList() { ) : feedScope === 'urls' ? ( <> - + {displayedFeed.rows .filter((r): r is Extract => r.kind === 'url') .map((row) => ( diff --git a/src/i18n/locales/ar.ts b/src/i18n/locales/ar.ts index 061da6b5..2e613570 100644 --- a/src/i18n/locales/ar.ts +++ b/src/i18n/locales/ar.ts @@ -1518,6 +1518,8 @@ export default { 'Article URLs': 'Article URLs', 'Article URLs subtitle': 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', + 'Article URLs Nostr manual subtitle': + 'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.', 'RSS timeline': 'RSS timeline', 'RSS timeline subtitle': 'Every item from your subscribed feeds, newest first — classic RSS reader.', @@ -1535,6 +1537,7 @@ export default { 'Web highlights': 'Web highlights', 'In your bookmarks': 'In your bookmarks', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', + '{{count}} entries for this article URL': '{{count}} entries for this article URL', 'No comments yet': 'No comments yet', 'No highlights yet': 'No highlights yet', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', diff --git a/src/i18n/locales/de.ts b/src/i18n/locales/de.ts index b6fba3b5..90e178b4 100644 --- a/src/i18n/locales/de.ts +++ b/src/i18n/locales/de.ts @@ -1557,6 +1557,8 @@ export default { 'Article URLs': 'Article URLs', 'Article URLs subtitle': 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', + 'Article URLs Nostr manual subtitle': + 'Nur Links aus Nostr-Relays (Entdeckung) oder von dir hinzugefügte URLs. Einträge, die nur aus abonnierten RSS-Feeds stammen, erscheinen hier nicht — dafür RSS oder Beides.', 'RSS timeline': 'RSS timeline', 'RSS timeline subtitle': 'Every item from your subscribed feeds, newest first — classic RSS reader.', @@ -1574,6 +1576,7 @@ export default { 'Web highlights': 'Web highlights', 'In your bookmarks': 'In your bookmarks', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', + '{{count}} entries for this article URL': '{{count}} Einträge zu dieser Artikel-URL', 'No comments yet': 'No comments yet', 'No highlights yet': 'No highlights yet', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index 9058b828..4d1d1131 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -1531,6 +1531,8 @@ export default { 'Article URLs': 'Article URLs', 'Article URLs subtitle': 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', + 'Article URLs Nostr manual subtitle': + 'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.', 'RSS timeline': 'RSS timeline', 'RSS timeline subtitle': 'Every item from your subscribed feeds, newest first — classic RSS reader.', @@ -1548,6 +1550,7 @@ export default { 'Web highlights': 'Web highlights', 'In your bookmarks': 'In your bookmarks', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', + '{{count}} entries for this article URL': '{{count}} entries for this article URL', 'No comments yet': 'No comments yet', 'No highlights yet': 'No highlights yet', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', diff --git a/src/i18n/locales/es.ts b/src/i18n/locales/es.ts index 666bd741..be8196e8 100644 --- a/src/i18n/locales/es.ts +++ b/src/i18n/locales/es.ts @@ -1526,6 +1526,8 @@ export default { 'Article URLs': 'Article URLs', 'Article URLs subtitle': 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', + 'Article URLs Nostr manual subtitle': + 'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.', 'RSS timeline': 'RSS timeline', 'RSS timeline subtitle': 'Every item from your subscribed feeds, newest first — classic RSS reader.', @@ -1543,6 +1545,7 @@ export default { 'Web highlights': 'Web highlights', 'In your bookmarks': 'In your bookmarks', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', + '{{count}} entries for this article URL': '{{count}} entries for this article URL', 'No comments yet': 'No comments yet', 'No highlights yet': 'No highlights yet', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', diff --git a/src/i18n/locales/fa.ts b/src/i18n/locales/fa.ts index a34c76fc..68473718 100644 --- a/src/i18n/locales/fa.ts +++ b/src/i18n/locales/fa.ts @@ -1522,6 +1522,8 @@ export default { 'Article URLs': 'Article URLs', 'Article URLs subtitle': 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', + 'Article URLs Nostr manual subtitle': + 'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.', 'RSS timeline': 'RSS timeline', 'RSS timeline subtitle': 'Every item from your subscribed feeds, newest first — classic RSS reader.', @@ -1539,6 +1541,7 @@ export default { 'Web highlights': 'Web highlights', 'In your bookmarks': 'In your bookmarks', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', + '{{count}} entries for this article URL': '{{count}} entries for this article URL', 'No comments yet': 'No comments yet', 'No highlights yet': 'No highlights yet', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', diff --git a/src/i18n/locales/fr.ts b/src/i18n/locales/fr.ts index aace57d4..277f5148 100644 --- a/src/i18n/locales/fr.ts +++ b/src/i18n/locales/fr.ts @@ -1531,6 +1531,8 @@ export default { 'Article URLs': 'Article URLs', 'Article URLs subtitle': 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', + 'Article URLs Nostr manual subtitle': + 'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.', 'RSS timeline': 'RSS timeline', 'RSS timeline subtitle': 'Every item from your subscribed feeds, newest first — classic RSS reader.', @@ -1548,6 +1550,7 @@ export default { 'Web highlights': 'Web highlights', 'In your bookmarks': 'In your bookmarks', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', + '{{count}} entries for this article URL': '{{count}} entries for this article URL', 'No comments yet': 'No comments yet', 'No highlights yet': 'No highlights yet', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', diff --git a/src/i18n/locales/hi.ts b/src/i18n/locales/hi.ts index 6d91ed8f..f4bf5735 100644 --- a/src/i18n/locales/hi.ts +++ b/src/i18n/locales/hi.ts @@ -1524,6 +1524,8 @@ export default { 'Article URLs': 'Article URLs', 'Article URLs subtitle': 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', + 'Article URLs Nostr manual subtitle': + 'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.', 'RSS timeline': 'RSS timeline', 'RSS timeline subtitle': 'Every item from your subscribed feeds, newest first — classic RSS reader.', @@ -1541,6 +1543,7 @@ export default { 'Web highlights': 'Web highlights', 'In your bookmarks': 'In your bookmarks', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', + '{{count}} entries for this article URL': '{{count}} entries for this article URL', 'No comments yet': 'No comments yet', 'No highlights yet': 'No highlights yet', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', diff --git a/src/i18n/locales/it.ts b/src/i18n/locales/it.ts index d2498471..259bb349 100644 --- a/src/i18n/locales/it.ts +++ b/src/i18n/locales/it.ts @@ -1527,6 +1527,8 @@ export default { 'Article URLs': 'Article URLs', 'Article URLs subtitle': 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', + 'Article URLs Nostr manual subtitle': + 'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.', 'RSS timeline': 'RSS timeline', 'RSS timeline subtitle': 'Every item from your subscribed feeds, newest first — classic RSS reader.', @@ -1544,6 +1546,7 @@ export default { 'Web highlights': 'Web highlights', 'In your bookmarks': 'In your bookmarks', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', + '{{count}} entries for this article URL': '{{count}} entries for this article URL', 'No comments yet': 'No comments yet', 'No highlights yet': 'No highlights yet', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', diff --git a/src/i18n/locales/ja.ts b/src/i18n/locales/ja.ts index ae37817d..bb32910d 100644 --- a/src/i18n/locales/ja.ts +++ b/src/i18n/locales/ja.ts @@ -1522,6 +1522,8 @@ export default { 'Article URLs': 'Article URLs', 'Article URLs subtitle': 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', + 'Article URLs Nostr manual subtitle': + 'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.', 'RSS timeline': 'RSS timeline', 'RSS timeline subtitle': 'Every item from your subscribed feeds, newest first — classic RSS reader.', @@ -1539,6 +1541,7 @@ export default { 'Web highlights': 'Web highlights', 'In your bookmarks': 'In your bookmarks', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', + '{{count}} entries for this article URL': '{{count}} entries for this article URL', 'No comments yet': 'No comments yet', 'No highlights yet': 'No highlights yet', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', diff --git a/src/i18n/locales/ko.ts b/src/i18n/locales/ko.ts index a5e380fa..47426d64 100644 --- a/src/i18n/locales/ko.ts +++ b/src/i18n/locales/ko.ts @@ -1520,6 +1520,8 @@ export default { 'Article URLs': 'Article URLs', 'Article URLs subtitle': 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', + 'Article URLs Nostr manual subtitle': + 'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.', 'RSS timeline': 'RSS timeline', 'RSS timeline subtitle': 'Every item from your subscribed feeds, newest first — classic RSS reader.', @@ -1537,6 +1539,7 @@ export default { 'Web highlights': 'Web highlights', 'In your bookmarks': 'In your bookmarks', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', + '{{count}} entries for this article URL': '{{count}} entries for this article URL', 'No comments yet': 'No comments yet', 'No highlights yet': 'No highlights yet', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', diff --git a/src/i18n/locales/pl.ts b/src/i18n/locales/pl.ts index 58fd535d..cd0d5809 100644 --- a/src/i18n/locales/pl.ts +++ b/src/i18n/locales/pl.ts @@ -1525,6 +1525,8 @@ export default { 'Article URLs': 'Article URLs', 'Article URLs subtitle': 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', + 'Article URLs Nostr manual subtitle': + 'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.', 'RSS timeline': 'RSS timeline', 'RSS timeline subtitle': 'Every item from your subscribed feeds, newest first — classic RSS reader.', @@ -1542,6 +1544,7 @@ export default { 'Web highlights': 'Web highlights', 'In your bookmarks': 'In your bookmarks', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', + '{{count}} entries for this article URL': '{{count}} entries for this article URL', 'No comments yet': 'No comments yet', 'No highlights yet': 'No highlights yet', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', diff --git a/src/i18n/locales/pt-BR.ts b/src/i18n/locales/pt-BR.ts index e7b4da2f..d6e92290 100644 --- a/src/i18n/locales/pt-BR.ts +++ b/src/i18n/locales/pt-BR.ts @@ -1524,6 +1524,8 @@ export default { 'Article URLs': 'Article URLs', 'Article URLs subtitle': 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', + 'Article URLs Nostr manual subtitle': + 'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.', 'RSS timeline': 'RSS timeline', 'RSS timeline subtitle': 'Every item from your subscribed feeds, newest first — classic RSS reader.', @@ -1541,6 +1543,7 @@ export default { 'Web highlights': 'Web highlights', 'In your bookmarks': 'In your bookmarks', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', + '{{count}} entries for this article URL': '{{count}} entries for this article URL', 'No comments yet': 'No comments yet', 'No highlights yet': 'No highlights yet', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', diff --git a/src/i18n/locales/pt-PT.ts b/src/i18n/locales/pt-PT.ts index d1cad52b..c9b49bb8 100644 --- a/src/i18n/locales/pt-PT.ts +++ b/src/i18n/locales/pt-PT.ts @@ -1526,6 +1526,8 @@ export default { 'Article URLs': 'Article URLs', 'Article URLs subtitle': 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', + 'Article URLs Nostr manual subtitle': + 'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.', 'RSS timeline': 'RSS timeline', 'RSS timeline subtitle': 'Every item from your subscribed feeds, newest first — classic RSS reader.', @@ -1543,6 +1545,7 @@ export default { 'Web highlights': 'Web highlights', 'In your bookmarks': 'In your bookmarks', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', + '{{count}} entries for this article URL': '{{count}} entries for this article URL', 'No comments yet': 'No comments yet', 'No highlights yet': 'No highlights yet', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', diff --git a/src/i18n/locales/ru.ts b/src/i18n/locales/ru.ts index f0f3d02e..48248720 100644 --- a/src/i18n/locales/ru.ts +++ b/src/i18n/locales/ru.ts @@ -1527,6 +1527,8 @@ export default { 'Article URLs': 'Article URLs', 'Article URLs subtitle': 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', + 'Article URLs Nostr manual subtitle': + 'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.', 'RSS timeline': 'RSS timeline', 'RSS timeline subtitle': 'Every item from your subscribed feeds, newest first — classic RSS reader.', @@ -1544,6 +1546,7 @@ export default { 'Web highlights': 'Web highlights', 'In your bookmarks': 'In your bookmarks', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', + '{{count}} entries for this article URL': '{{count}} entries for this article URL', 'No comments yet': 'No comments yet', 'No highlights yet': 'No highlights yet', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', diff --git a/src/i18n/locales/th.ts b/src/i18n/locales/th.ts index 98dec6d9..f7f35906 100644 --- a/src/i18n/locales/th.ts +++ b/src/i18n/locales/th.ts @@ -1517,6 +1517,8 @@ export default { 'Article URLs': 'Article URLs', 'Article URLs subtitle': 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', + 'Article URLs Nostr manual subtitle': + 'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.', 'RSS timeline': 'RSS timeline', 'RSS timeline subtitle': 'Every item from your subscribed feeds, newest first — classic RSS reader.', @@ -1534,6 +1536,7 @@ export default { 'Web highlights': 'Web highlights', 'In your bookmarks': 'In your bookmarks', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', + '{{count}} entries for this article URL': '{{count}} entries for this article URL', 'No comments yet': 'No comments yet', 'No highlights yet': 'No highlights yet', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', diff --git a/src/i18n/locales/zh.ts b/src/i18n/locales/zh.ts index cb9957f0..bab2913a 100644 --- a/src/i18n/locales/zh.ts +++ b/src/i18n/locales/zh.ts @@ -1512,6 +1512,8 @@ export default { 'Article URLs': 'Article URLs', 'Article URLs subtitle': 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', + 'Article URLs Nostr manual subtitle': + 'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.', 'RSS timeline': 'RSS timeline', 'RSS timeline subtitle': 'Every item from your subscribed feeds, newest first — classic RSS reader.', @@ -1529,6 +1531,7 @@ export default { 'Web highlights': 'Web highlights', 'In your bookmarks': 'In your bookmarks', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', + '{{count}} entries for this article URL': '{{count}} entries for this article URL', 'No comments yet': 'No comments yet', 'No highlights yet': 'No highlights yet', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', diff --git a/src/lib/rss-web-feed.ts b/src/lib/rss-web-feed.ts index 3a6b87ba..f2486b68 100644 --- a/src/lib/rss-web-feed.ts +++ b/src/lib/rss-web-feed.ts @@ -31,7 +31,10 @@ export const RSS_WEB_FEED_SCOPE_SETTING = 'rssWebFeedScope' /** IndexedDB: JSON array of `{ url, addedAt }` for URLs added from “Add URL” (no RSS row yet). */ export const RSS_WEB_MANUAL_URLS_SETTING = 'rssWebManualUrls' -/** `urls` = one card per article URL (Nostr + RSS merge). `rss` = classic chronological RSS list. `both` = mixed timeline with distinct row UIs. */ +/** + * `urls` = article URL cards that come from manual URLs or Nostr discovery only (not RSS-grouped links). + * `rss` = classic chronological RSS list only. `both` = all URL cards (RSS-enriched + Nostr/manual) plus RSS-only rows. + */ export type RssWebFeedScope = 'urls' | 'rss' | 'both' /** Normalize stored scope (legacy `webOnly` / `rssOnly` / `webAndRss` included). */ @@ -298,6 +301,11 @@ export type ArticleUrlFeedWebRow = { canonicalUrl: string rssItems: RssFeedItem[] latestPub: number + /** + * True when this URL came from the manual list or Nostr relay discovery. False when the row exists only + * because RSS items were grouped by link (RSS-only article cards). + */ + fromNostrOrManual: boolean } export function buildArticleUrlFeedRows( @@ -308,10 +316,17 @@ export function buildArticleUrlFeedRows( ): { webRows: ArticleUrlFeedWebRow[]; nonHttpItems: RssFeedItem[] } { const { groups, nonHttpItems } = partitionRssItemsForWebFeed(filteredItems, options) const excludeClutter = options?.excludeClutterLinks !== false - const webByUrl = new Map() + const webByUrl = new Map< + string, + { rssItems: RssFeedItem[]; latestPub: number; fromNostrOrManual: boolean } + >() for (const g of groups) { - webByUrl.set(g.canonicalUrl, { rssItems: g.items, latestPub: g.latestPub }) + webByUrl.set(g.canonicalUrl, { + rssItems: g.items, + latestPub: g.latestPub, + fromNostrOrManual: false + }) } const mergeNostrTimestamp = (url: string, ts: number) => { @@ -319,10 +334,11 @@ export function buildArticleUrlFeedRows( if (cur) { webByUrl.set(url, { ...cur, - latestPub: Math.max(cur.latestPub, ts) + latestPub: Math.max(cur.latestPub, ts), + fromNostrOrManual: true }) } else { - webByUrl.set(url, { rssItems: [], latestPub: ts }) + webByUrl.set(url, { rssItems: [], latestPub: ts, fromNostrOrManual: true }) } } @@ -342,7 +358,8 @@ export function buildArticleUrlFeedRows( kind: 'web' as const, canonicalUrl, rssItems: v.rssItems, - latestPub: v.latestPub + latestPub: v.latestPub, + fromNostrOrManual: v.fromNostrOrManual }) ) webRows.sort((a, b) => b.latestPub - a.latestPub)