From 424d4005b8ec4ab71c0a6aa1cdd2cee3acd01aba Mon Sep 17 00:00:00 2001 From: neuronull <9162534+neuronull@users.noreply.github.com> Date: Wed, 29 Oct 2025 15:16:53 -0600 Subject: [PATCH] claude: multiple listeners --- .../src/autofill/services/desktop-autotype.service.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/desktop/src/autofill/services/desktop-autotype.service.ts b/apps/desktop/src/autofill/services/desktop-autotype.service.ts index c92cb5f1289..22eb5ae414f 100644 --- a/apps/desktop/src/autofill/services/desktop-autotype.service.ts +++ b/apps/desktop/src/autofill/services/desktop-autotype.service.ts @@ -2,6 +2,7 @@ import { takeUntilDestroyed } from "@angular/core/rxjs-interop"; import { combineLatest, concatMap, + distinctUntilChanged, filter, firstValueFrom, map, @@ -158,13 +159,15 @@ export class DesktopAutotypeService { ), ]) .pipe( - concatMap(async ([settingsEnabled, ffEnabled, authStatus, hasPremium]) => { - const enabled = + map( + ([settingsEnabled, ffEnabled, authStatus, hasPremium]) => settingsEnabled && ffEnabled && authStatus == AuthenticationStatus.Unlocked && - hasPremium; - + hasPremium, + ), + distinctUntilChanged(), // Only emit when the boolean result changes + concatMap(async (enabled) => { ipc.autofill.toggleAutotype(enabled); }), takeUntilDestroyed(),