fix(core): fix auth session not revalidating as expected (#8886)

This commit is contained in:
EYHN
2024-11-21 09:57:25 +00:00
parent a4c749b882
commit 76eabf644c

View File

@@ -2,13 +2,14 @@ import {
backoffRetry,
effect,
Entity,
exhaustMapWithTrailing,
fromPromise,
LiveData,
onComplete,
onStart,
} from '@toeverything/infra';
import { isEqual } from 'lodash-es';
import { EMPTY, exhaustMap, mergeMap } from 'rxjs';
import { EMPTY, mergeMap } from 'rxjs';
import { validateAndReduceImage } from '../../../utils/reduce-image';
import type { AccountProfile, AuthStore } from '../stores/auth';
@@ -66,7 +67,7 @@ export class AuthSession extends Entity {
}
revalidate = effect(
exhaustMap(() =>
exhaustMapWithTrailing(() =>
fromPromise(this.getSession()).pipe(
backoffRetry({
count: Infinity,