From 5de6e7947529cbaccc74662315385f96562c54bc Mon Sep 17 00:00:00 2001 From: Kiryl Budnik Date: Thu, 26 Oct 2023 11:26:20 +0200 Subject: [PATCH] treat a missing commonFeedObjectUserUnique for the user as "New" --- .../components/DiscussionFeedCard/DiscussionFeedCard.tsx | 6 ++++-- .../common/components/ProposalFeedCard/ProposalFeedCard.tsx | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pages/common/components/DiscussionFeedCard/DiscussionFeedCard.tsx b/src/pages/common/components/DiscussionFeedCard/DiscussionFeedCard.tsx index 06691f7d57..4e2641abd4 100644 --- a/src/pages/common/components/DiscussionFeedCard/DiscussionFeedCard.tsx +++ b/src/pages/common/components/DiscussionFeedCard/DiscussionFeedCard.tsx @@ -327,8 +327,10 @@ const DiscussionFeedCard = forwardRef( isFollowing={feedItemFollow.isFollowing} isLoading={isLoading} menuItems={menuItems} - seenOnce={feedItemUserMetadata?.seenOnce ?? true} - seen={feedItemUserMetadata?.seen ?? true} + seenOnce={ + feedItemUserMetadata?.seenOnce ?? !isFeedItemUserMetadataFetched + } + seen={feedItemUserMetadata?.seen ?? !isFeedItemUserMetadataFetched} ownerId={item.userId} discussionPredefinedType={discussion?.predefinedType} > diff --git a/src/pages/common/components/ProposalFeedCard/ProposalFeedCard.tsx b/src/pages/common/components/ProposalFeedCard/ProposalFeedCard.tsx index a1ec3693a3..934cd0720d 100644 --- a/src/pages/common/components/ProposalFeedCard/ProposalFeedCard.tsx +++ b/src/pages/common/components/ProposalFeedCard/ProposalFeedCard.tsx @@ -452,8 +452,10 @@ const ProposalFeedCard = forwardRef( isFollowing={feedItemFollow.isFollowing} isLoading={isLoading} type={item.data.type} - seenOnce={feedItemUserMetadata?.seenOnce ?? true} - seen={feedItemUserMetadata?.seen ?? true} + seenOnce={ + feedItemUserMetadata?.seenOnce ?? !isFeedItemUserMetadataFetched + } + seen={feedItemUserMetadata?.seen ?? !isFeedItemUserMetadataFetched} menuItems={menuItems} ownerId={item.userId} >