fix(cloud PFP): Not pulling from cloud on page load

This commit is contained in:
2026-06-25 18:36:57 +09:30
parent c9b9ad250e
commit 670f9d73f3
5 changed files with 249 additions and 67 deletions
@@ -1,5 +1,5 @@
<script lang="ts">
import { resolveCloudPfp } from "@/seqta/utils/cloudPfpCache";
import { resolveCloudPfp, defaultAccountsPfpUrl } from "@/seqta/utils/cloudPfpCache";
import type { CloudUser } from "@/seqta/utils/CloudAuth";
const { user, class: className = "" } = $props<{
@@ -18,10 +18,12 @@
}
avatarSrc = undefined;
if (!u?.pfpUrl || !u.id) return;
if (!u?.id) return;
const pfpUrl = u.pfpUrl ?? defaultAccountsPfpUrl(u.id);
let cancelled = false;
void resolveCloudPfp(u.id, u.pfpUrl).then((resolved) => {
void resolveCloudPfp(u.id, pfpUrl).then((resolved) => {
if (cancelled || !resolved) return;
if (resolved.fromCache) {
revokeUrl = resolved.src;