mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
Fix desktop windows autotype disabled on first login (#16669)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { combineLatest, filter, firstValueFrom, map, Observable, of, switchMap } from "rxjs";
|
import { combineLatest, filter, firstValueFrom, map, Observable, of, switchMap } from "rxjs";
|
||||||
|
|
||||||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
import { Account, AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
||||||
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
|
import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service";
|
||||||
import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status";
|
import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status";
|
||||||
import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions";
|
import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions";
|
||||||
@@ -109,9 +109,9 @@ export class DesktopAutotypeService {
|
|||||||
switchMap((userId) => this.authService.authStatusFor$(userId)),
|
switchMap((userId) => this.authService.authStatusFor$(userId)),
|
||||||
),
|
),
|
||||||
this.accountService.activeAccount$.pipe(
|
this.accountService.activeAccount$.pipe(
|
||||||
map((activeAccount) => activeAccount?.id),
|
filter((account): account is Account => !!account),
|
||||||
switchMap((userId) =>
|
switchMap((account) =>
|
||||||
this.billingAccountProfileStateService.hasPremiumFromAnySource$(userId),
|
this.billingAccountProfileStateService.hasPremiumFromAnySource$(account.id),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]).pipe(
|
]).pipe(
|
||||||
|
|||||||
Reference in New Issue
Block a user