mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-08-02 23:13:08 +02:00
fix: Re-render messages after geo cache loads to show Map buttons
Messages are now displayed immediately, then re-rendered once geo cache is ready so Map buttons appear for contacts with GPS coordinates. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -321,10 +321,11 @@ document.addEventListener('DOMContentLoaded', async function() {
|
||||
// This updates the unread badges without blocking initial load
|
||||
checkForUpdates(); // No await - runs in background
|
||||
|
||||
// Geo cache loads in background - Map buttons will work once it completes
|
||||
// No need to await - just let it finish whenever
|
||||
// Geo cache loads in background - once loaded, re-render messages to show Map buttons
|
||||
geoCachePromise.then(() => {
|
||||
console.log(`[init] Geo cache loaded in ${(performance.now() - initStart).toFixed(0)}ms`);
|
||||
console.log(`[init] Geo cache loaded in ${(performance.now() - initStart).toFixed(0)}ms, refreshing messages for Map buttons`);
|
||||
// Re-render messages now that geo cache is available (Map buttons will appear)
|
||||
loadMessages();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user