mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
fix(core): fix auth session not revalidating as expected (#8886)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user