From 8ee9a5b6e0bcf0bd28de6443925db8b456da3370 Mon Sep 17 00:00:00 2001 From: Ashis Kumar Naik Date: Wed, 2 Jul 2025 08:24:53 +0530 Subject: [PATCH] feat: add network health monitoring for offline detection --- src/contexts/forum/network.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/contexts/forum/network.ts b/src/contexts/forum/network.ts index 3613e3c..e59032b 100644 --- a/src/contexts/forum/network.ts +++ b/src/contexts/forum/network.ts @@ -56,6 +56,10 @@ export const initializeNetwork = async ( setError: (error: string | null) => void ): Promise => { try { + // First hydrate from IndexedDB for instant UI + await messageManager.hydrateFromStorage(); + updateStateFromCache(); + toast({ title: "Loading data", description: "Connecting to the Waku network...",