Show chat uploads in gallery immediately

This commit is contained in:
pewdiepie-archdaemon
2026-06-29 01:57:35 +00:00
parent 402a2771b3
commit b419caf9f7
2 changed files with 20 additions and 4 deletions
+4
View File
@@ -183,6 +183,10 @@ export async function uploadPending() {
}
const data = await res.json();
uploaded = (data.files || []);
if (uploaded.some(x => x && x.gallery_id)) {
try { localStorage.setItem('gallery-fresh-chat-upload', String(Date.now())); } catch (_) {}
window.dispatchEvent(new CustomEvent('gallery-refresh', { detail: { source: 'chat-upload' } }));
}
pendingFiles = []; // clear only on success
// Stash the full meta (incl. width/height for images) on the module so
// callers that want it can grab it via getLastUploadedMeta(). Keep the