ATlast — you'll never need to find your favorites on another platform again. Find your favs in the ATmosphere.
atproto

clear cache so history shows immediately after upload

byarielm.fyi 2028b856 de2624b4

verified
Changed files
+13 -1
src
+6 -1
src/App.tsx
··· 104 104 if (currentResults.length > 0) { 105 105 apiClient 106 106 .saveResults(uploadId, platform, currentResults) 107 + .then(() => { 108 + // Invalidate cache after successful save 109 + apiClient.cache.invalidate("uploads"); 110 + apiClient.cache.invalidatePattern("upload-details"); 111 + }) 107 112 .catch((err) => { 108 113 console.error("Background save failed:", err); 109 114 }); 110 115 } 111 - return currentResults; // Don't modify, just return as-is 116 + return currentResults; 112 117 }); 113 118 }, 1000); // Longer delay to ensure all state updates complete 114 119 }
+7
src/pages/Home.tsx
··· 68 68 } 69 69 }, [session, userSettings.wizardCompleted]); 70 70 71 + // Reload uploads when navigating to history tab 72 + useEffect(() => { 73 + if (activeTab === "history" && session) { 74 + loadUploads(); 75 + } 76 + }, [activeTab, session]); 77 + 71 78 async function loadUploads() { 72 79 try { 73 80 setIsLoading(true);