mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-07-12 12:37:32 +00:00
Show chat uploads in gallery immediately
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user