diff --git a/src/contexts/ProfileContext.tsx b/src/contexts/ProfileContext.tsx index 89915f6..930c032 100644 --- a/src/contexts/ProfileContext.tsx +++ b/src/contexts/ProfileContext.tsx @@ -267,8 +267,10 @@ export const ProfileProvider = (props: { children: ContextChildren }) => { updateStore('userProfile', () => undefined); updateStore('userStats', () => ({ ...emptyStats })); getUserProfileInfo(profileKey, `profile_info_${APP_ID}`); - getProfileContactList(profileKey, `profile_contacts_${APP_ID}`); getProfileScoredNotes(profileKey, `profile_scored_${APP_ID}`, 10); + setTimeout(() => { + getProfileContactList(profileKey, `profile_contacts_${APP_ID}`); + }, 100); } } diff --git a/src/pages/Profile.tsx b/src/pages/Profile.tsx index 6128402..53abafe 100644 --- a/src/pages/Profile.tsx +++ b/src/pages/Profile.tsx @@ -75,32 +75,11 @@ const Profile: Component = () => { } const setProfile = (hex: string | undefined) => { - // if (hex === profile?.profileKey) { - // return; - // } - profile?.actions.setProfileKey(hex); profile?.actions.clearNotes(); profile?.actions.fetchNotes(hex); } - // const react = createReaction(() => { - // setProfile(getHex()); - // }); - - // onMount(() => { - // // If connection doesn't exist at mount time, - // // create a one-time reaction, when connection is established - // // to fetch profile data. - // if (!isConnected()) { - // react(() => isConnected()); - // return; - // } - - // // Otherwise, fetch profile data. - // setProfile(getHex()); - // }); - createEffect(() => { if (account?.isKeyLookupDone) { setProfile(getHex());