From 5b19f7c711abbf76f63534bc99a1de30a8cf2bed Mon Sep 17 00:00:00 2001 From: Hemachandar <132386067+hmacr@users.noreply.github.com> Date: Thu, 7 Aug 2025 22:22:53 +0530 Subject: [PATCH] fix: Prefetch non-archived notificatios only (#9869) --- app/components/Notifications/NotificationsPopover.tsx | 2 +- app/stores/NotificationsStore.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/Notifications/NotificationsPopover.tsx b/app/components/Notifications/NotificationsPopover.tsx index 61faec3930..7a9abacd5f 100644 --- a/app/components/Notifications/NotificationsPopover.tsx +++ b/app/components/Notifications/NotificationsPopover.tsx @@ -20,7 +20,7 @@ const NotificationsPopover: React.FC = ({ children }: Props) => { const scrollableRef = React.useRef(null); React.useEffect(() => { - void notifications.fetchPage({}); + void notifications.fetchPage({ archived: false }); }, [notifications]); const handleRequestClose = React.useCallback(() => { diff --git a/app/stores/NotificationsStore.ts b/app/stores/NotificationsStore.ts index 265cbfba1e..205ca93afb 100644 --- a/app/stores/NotificationsStore.ts +++ b/app/stores/NotificationsStore.ts @@ -17,7 +17,7 @@ export default class NotificationsStore extends Store { @action fetchPage = async ( - options: PaginationParams | undefined + options: ({ archived?: boolean } & PaginationParams) | undefined ): Promise => { this.isFetching = true;