mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Defer post-login hydration to async follow-up
This commit is contained in:
1 parent
f61563d2e2
commit
0a3057d081
3 files changed
+111
-10
No files matched your search
@@ -3856,6 +3856,11 @@ export class ProfileModalController {
|
||||
}
|
||||
|
||||
async handleAuthLogin(detail = {}) {
|
||||
const postLoginPromise =
|
||||
detail && typeof detail.postLoginPromise?.then === "function"
|
||||
? detail.postLoginPromise
|
||||
: Promise.resolve(detail?.postLogin ?? null);
|
||||
|
||||
const savedProfiles = Array.isArray(detail?.savedProfiles)
|
||||
? detail.savedProfiles
|
||||
: null;
|
||||
@@ -3893,6 +3898,19 @@ export class ProfileModalController {
|
||||
this.populateProfileRelays();
|
||||
this.refreshWalletPaneState();
|
||||
|
||||
postLoginPromise
|
||||
.then(() => {
|
||||
this.populateBlockedList();
|
||||
this.populateProfileRelays();
|
||||
this.refreshWalletPaneState();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.warn(
|
||||
"[profileModal] Failed to hydrate deferred login data:",
|
||||
error,
|
||||
);
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user