diff --git a/app/courrier/page.tsx b/app/courrier/page.tsx index a9bd1839..1d6aa97a 100644 --- a/app/courrier/page.tsx +++ b/app/courrier/page.tsx @@ -1049,7 +1049,8 @@ export default function CourrierPage() { className="flex-1 overflow-y-auto" onScroll={handleScroll} > - {loading || isLoadingInitial ? ( + {/* Only show loading if we don't have emails yet - this prevents stuck loading states */} + {(loading || isLoadingInitial) && filteredEmails.length === 0 ? (
@@ -1092,6 +1093,13 @@ export default function CourrierPage() {
)} + {/* Show loading indicator at the bottom if we're still loading but have emails */} + {(loading || isLoadingInitial) && filteredEmails.length > 0 && ( +
+
+ Refreshing email list... +
+ )}
)} @@ -1102,8 +1110,8 @@ export default function CourrierPage() { // Update the email count in the header to show filtered count const renderEmailListHeader = () => (
-
-
+
+