Merge pull request #1939 from PR0M3TH3AN/codex/decide-ownership-for-block-list-loading

Centralize block list loading in AuthService (remove app-level load)
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-01-29 12:44:17 -05:00
commit 66ba0b81a6
1 file changed
-15
-15
View File
@@ -4311,21 +4311,6 @@ class Application {
}
});
// Attempt to load blocks with a short timeout so we don't block the UI forever.
// If it times out, the UI will refresh reactively when the data arrives.
const blockLoadPromise = userBlocks.ensureLoaded(activePubkey);
const blockLoadTimeout = new Promise((resolve) =>
setTimeout(resolve, 2000)
);
try {
await Promise.race([blockLoadPromise, blockLoadTimeout]);
} catch (error) {
devLogger.warn(
"[Application] Block list load timed out or failed:",
error
);
}
// Load subscriptions in the background to avoid blocking the main feed.
subscriptions.ensureLoaded(activePubkey).catch((error) => {
devLogger.warn(