le8i2digy: Keep the posts and show an inline error when a refresh fails

This commit is contained in:
2026-10-20 08:09:51 -06:00
parent 69a11436f5
commit b3cfe94810
5 changed files with 41 additions and 5 deletions
+5
View File
@@ -194,6 +194,11 @@ export function upgradeVideos(current: CardPost[], fresh: CardPost[]): CardPost[
return changed ? next : current;
}
/** A failed first-page load: a refresh keeps the posts and flags an inline error; an initial load shows the full error state. */
export function firstLoadFailure(refresh: boolean): { fullError: boolean; refreshFailed: boolean } {
return { fullError: !refresh, refreshFailed: refresh };
}
/** "1 comment", "0 comments", "2 comments". */
export function commentsLabel(count: number): string {
return count === 1 ? "1 comment" : `${count} comments`;