From 588d9fbdb09966730b9999c2556a792156b8d976 Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Sun, 23 Feb 2025 16:30:13 +0100 Subject: [PATCH] fix(feed): "no posts" could appear in an empty board after the user published to it --- src/views/board/board.tsx | 2 +- src/views/catalog/catalog.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/board/board.tsx b/src/views/board/board.tsx index 590cd12c..7f910de6 100644 --- a/src/views/board/board.tsx +++ b/src/views/board/board.tsx @@ -165,7 +165,7 @@ const Board = () => { const Footer = () => { let footerContent; - if (feed.length === 0) { + if (combinedFeed.length === 0) { footerContent = t('no_threads'); } if (hasMore || (subplebbitAddresses && subplebbitAddresses.length === 0)) { diff --git a/src/views/catalog/catalog.tsx b/src/views/catalog/catalog.tsx index ab6f7e9e..ffcee164 100644 --- a/src/views/catalog/catalog.tsx +++ b/src/views/catalog/catalog.tsx @@ -187,7 +187,7 @@ const Catalog = () => { t('not_subscribed_to_any_board') ) : blocked ? ( t('you_have_blocked_this_board') - ) : !hasMore && feed.length === 0 ? ( + ) : !hasMore && combinedFeed.length === 0 ? ( t('no_threads') ) : ( hasMore && @@ -209,7 +209,7 @@ const Catalog = () => { if (feed.length === 0) { if (blocked) { footerContent = t('you_have_blocked_this_board'); - } else { + } else if (combinedFeed.length === 0) { footerContent = t('no_threads'); } }