mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-03 11:22:25 +00:00
Remove duplicate block list load from app login
This commit is contained in:
1 parent
0cf39bce79
commit
377e6283a7
1 file changed
-15
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user