1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-02-14 01:01:31 +01:00

[PM-2014] fix: loading state not being set properly

This commit is contained in:
Andreas Coroiu 2023-05-10 11:34:13 +02:00
parent 524288df77
commit ef507cb2ac
No known key found for this signature in database
GPG Key ID: E70B5FFC81DFEC1A

View File

@ -22,6 +22,7 @@ export class WebauthnService {
private _loading$ = new BehaviorSubject<boolean>(true); private _loading$ = new BehaviorSubject<boolean>(true);
readonly credentials$ = this._refresh$.pipe( readonly credentials$ = this._refresh$.pipe(
tap(() => this._loading$.next(true)),
switchMap(() => this.getCredentials$()), switchMap(() => this.getCredentials$()),
tap(() => this._loading$.next(false)), tap(() => this._loading$.next(false)),
shareReplay({ bufferSize: 1, refCount: true }) shareReplay({ bufferSize: 1, refCount: true })
@ -104,7 +105,6 @@ export class WebauthnService {
} }
private refresh() { private refresh() {
this._loading$.next(true);
this._refresh$.next(); this._refresh$.next();
} }
} }