1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-22 11:45:59 +01:00

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 <djsmith85@users.noreply.github.com>
This commit is contained in:
Daniel James Smith 2024-10-15 16:54:00 +02:00 committed by GitHub
parent 7afc99da1e
commit 40ab96a7ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 16 deletions

View File

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

View File

@ -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;
}