1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-29 22:53:44 +00:00

claude: multiple listeners

This commit is contained in:
neuronull
2025-10-29 15:16:53 -06:00
parent cc855c375c
commit 424d4005b8

View File

@@ -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(),