From 40ab96a7ce382bf0ae1ce6f1af7bff72b684255b Mon Sep 17 00:00:00 2001 From: Daniel James Smith <2670567+djsmith85@users.noreply.github.com> Date: Tue, 15 Oct 2024 16:54:00 +0200 Subject: [PATCH] Show disabled Sends within Send list view (#11555) With #10192 we introduced the new send-list-filters, and filtered out any disabled sends. These still need to be shown as the the other clients still support enabling/disabling Sends This will be removed once all clients use the same shared components. Co-authored-by: Daniel James Smith --- .../src/services/send-list-filters.service.spec.ts | 12 +----------- .../src/services/send-list-filters.service.ts | 5 ----- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/libs/tools/send/send-ui/src/services/send-list-filters.service.spec.ts b/libs/tools/send/send-ui/src/services/send-list-filters.service.spec.ts index f41dab18e6..ef38938aba 100644 --- a/libs/tools/send/send-ui/src/services/send-list-filters.service.spec.ts +++ b/libs/tools/send/send-ui/src/services/send-list-filters.service.spec.ts @@ -1,6 +1,6 @@ import { TestBed } from "@angular/core/testing"; import { FormBuilder } from "@angular/forms"; -import { BehaviorSubject, first } from "rxjs"; +import { BehaviorSubject } from "rxjs"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; @@ -46,16 +46,6 @@ describe("SendListFiltersService", () => { expect(service.sendTypes.map((c) => c.value)).toEqual([SendType.File, SendType.Text]); }); - it("filters disabled sends", (done) => { - const sends = [{ disabled: true }, { disabled: false }, { disabled: true }] as SendView[]; - service.filterFunction$.pipe(first()).subscribe((filterFunction) => { - expect(filterFunction(sends)).toEqual([sends[1]]); - done(); - }); - - service.filterForm.patchValue({}); - }); - it("resets the filter form", () => { service.filterForm.patchValue({ sendType: SendType.Text }); service.resetFilterForm(); diff --git a/libs/tools/send/send-ui/src/services/send-list-filters.service.ts b/libs/tools/send/send-ui/src/services/send-list-filters.service.ts index 5b2c29329b..b3a21a3833 100644 --- a/libs/tools/send/send-ui/src/services/send-list-filters.service.ts +++ b/libs/tools/send/send-ui/src/services/send-list-filters.service.ts @@ -44,11 +44,6 @@ export class SendListFiltersService { map( (filters) => (sends: SendView[]) => sends.filter((send) => { - // do not show disabled sends - if (send.disabled) { - return false; - } - if (filters.sendType !== null && send.type !== filters.sendType) { return false; }