fix(post): hide stuck Loading and Downloading board for pending comments

This commit is contained in:
plebeius
2026-03-05 19:09:23 +08:00
parent 3fa758ef8c
commit 980b5ca572
2 changed files with 16 additions and 4 deletions
+8 -2
View File
@@ -1009,7 +1009,7 @@ const PostDesktop = ({
</span>
)}
{/* Virtuoso infinite scroll for post page view when there's more content to paginate */}
{!isHidden && showAllReplies && !isInPendingPostView && showReplies && hasMore && (
{!isHidden && showAllReplies && !isInPendingPostView && showReplies && hasMore && !!post?.replyCount && (
<Virtuoso
increaseViewportBy={{ bottom: 1200, top: 1200 }}
totalCount={filteredReplies.length}
@@ -1076,7 +1076,13 @@ const PostDesktop = ({
</div>
)}
</div>
{!isInPendingPostView && stateString && !hasFailedState && state !== 'succeeded' && isInPostPageView && !(!showReplies && !showAllReplies) ? (
{!isInPendingPostView &&
stateString &&
!hasFailedState &&
state !== 'succeeded' &&
!(post?.timestamp && !post?.updatedAt) &&
isInPostPageView &&
!(!showReplies && !showAllReplies) ? (
<div className={styles.stateString}>
<br />
<LoadingEllipsis string={stateString} />
+8 -2
View File
@@ -732,7 +732,7 @@ const PostMobile = ({
)}
</div>
{/* Virtuoso infinite scroll for post page view when there's more content to paginate */}
{showAllReplies && !isInPendingPostView && showReplies && hasMore && (
{showAllReplies && !isInPendingPostView && showReplies && hasMore && !!post?.replyCount && (
<Virtuoso
increaseViewportBy={{ bottom: 1200, top: 1200 }}
totalCount={filteredReplies.length}
@@ -792,7 +792,13 @@ const PostMobile = ({
</div>
))}
</div>
{!isInPendingPostView && stateString && !hasFailedState && state !== 'succeeded' && isInPostPageView && !(!showReplies && !showAllReplies) ? (
{!isInPendingPostView &&
stateString &&
!hasFailedState &&
state !== 'succeeded' &&
!(post?.timestamp && !post?.updatedAt) &&
isInPostPageView &&
!(!showReplies && !showAllReplies) ? (
<div className={styles.stateString}>
<LoadingEllipsis string={stateString} />
</div>