Resolve account subscription sync state

This commit is contained in:
2569718930@qq.com
2026-06-14 05:28:48 +08:00
parent 0084235b57
commit e783f35a4f
4 changed files with 60 additions and 1 deletions
+11
View File
@@ -40,6 +40,17 @@ export function isUnknownSubscriptionSnapshot(
);
}
export function shouldResolveAccountUnknownWithFullProfile(
snapshot: AuthSnapshotLike | null | undefined,
localUserPresent: boolean,
) {
return Boolean(
localUserPresent &&
snapshot?.authenticated !== false &&
isUnknownSubscriptionSnapshot(snapshot),
);
}
export function mergeAccountAuthSnapshot<T extends AuthSnapshotLike>(
previous: T | null | undefined,
next: T,