1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-29 14:43:31 +00:00

re-add distinctUntilChanged

This commit is contained in:
neuronull
2025-11-03 10:49:03 -07:00
parent 7fb19a49d0
commit 6d5d72efac

View File

@@ -2,6 +2,7 @@ import { Injectable, OnDestroy } from "@angular/core";
import {
combineLatest,
concatMap,
distinctUntilChanged,
filter,
firstValueFrom,
map,
@@ -88,6 +89,7 @@ export class DesktopAutotypeService implements OnDestroy {
) {
this.autotypeEnabledUserSetting$ = this.autotypeEnabledState.state$.pipe(
map((enabled) => enabled ?? false),
distinctUntilChanged(), // Only emit when the boolean result changes
takeUntil(this.destroy$),
);
@@ -96,6 +98,7 @@ export class DesktopAutotypeService implements OnDestroy {
switchMap((account) =>
this.billingAccountProfileStateService.hasPremiumFromAnySource$(account.id),
),
distinctUntilChanged(), // Only emit when the boolean result changes
takeUntil(this.destroy$),
);
@@ -190,6 +193,7 @@ export class DesktopAutotypeService implements OnDestroy {
authStatus === AuthenticationStatus.Unlocked &&
isPremiumAcct,
),
distinctUntilChanged(), // Only emit when the boolean result changes
takeUntil(this.destroy$),
);
}