mirror of
https://github.com/bitwarden/browser
synced 2025-12-29 14:43:31 +00:00
re-add distinctUntilChanged
This commit is contained in:
@@ -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$),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user