diff --git a/apps/desktop/src/autofill/services/desktop-autotype.service.ts b/apps/desktop/src/autofill/services/desktop-autotype.service.ts index 1f0cab9766a..65152450a86 100644 --- a/apps/desktop/src/autofill/services/desktop-autotype.service.ts +++ b/apps/desktop/src/autofill/services/desktop-autotype.service.ts @@ -48,14 +48,13 @@ export class DesktopAutotypeService { async init() { if (this.platformUtilsService.getDevice() === DeviceType.WindowsDesktop) { - const userId = await firstValueFrom( - this.accountService.activeAccount$.pipe(map((a) => a?.id)), - ); - this.autotypeEnabled$ = combineLatest([ this.autotypeEnabledState.state$, this.configService.getFeatureFlag$(FeatureFlag.WindowsDesktopAutotype), - this.authService.authStatusFor$(userId), + this.accountService.activeAccount$.pipe( + map((account) => account?.id), + switchMap((userId) => this.authService.authStatusFor$(userId)), + ), ]).pipe( map( ([autotypeEnabled, windowsDesktopAutotypeFeatureFlag, authStatus]) =>