mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-21 11:35:34 +01:00
Clear vault filter on account switch (#7227)
This commit is contained in:
parent
c95e0f3d9b
commit
4644392d5c
@ -496,6 +496,7 @@ export default class MainBackground {
|
||||
this.cipherService,
|
||||
this.collectionService,
|
||||
this.policyService,
|
||||
this.accountService,
|
||||
);
|
||||
|
||||
this.vaultTimeoutService = new VaultTimeoutService(
|
||||
|
@ -431,6 +431,7 @@ function getBgService<T>(service: keyof MainBackground) {
|
||||
organizationService: OrganizationService,
|
||||
folderService: FolderService,
|
||||
policyService: PolicyService,
|
||||
accountService: AccountServiceAbstraction,
|
||||
) => {
|
||||
return new VaultFilterService(
|
||||
stateService,
|
||||
@ -439,9 +440,16 @@ function getBgService<T>(service: keyof MainBackground) {
|
||||
getBgService<CipherService>("cipherService")(),
|
||||
getBgService<CollectionService>("collectionService")(),
|
||||
policyService,
|
||||
accountService,
|
||||
);
|
||||
},
|
||||
deps: [StateServiceAbstraction, OrganizationService, FolderService, PolicyService],
|
||||
deps: [
|
||||
StateServiceAbstraction,
|
||||
OrganizationService,
|
||||
FolderService,
|
||||
PolicyService,
|
||||
AccountServiceAbstraction,
|
||||
],
|
||||
},
|
||||
{
|
||||
provide: ProviderService,
|
||||
|
@ -2,6 +2,7 @@ import { VaultFilter } from "@bitwarden/angular/vault/vault-filter/models/vault-
|
||||
import { VaultFilterService as BaseVaultFilterService } from "@bitwarden/angular/vault/vault-filter/services/vault-filter.service";
|
||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||
import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction";
|
||||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
||||
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
|
||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||
import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service";
|
||||
@ -21,6 +22,7 @@ export class VaultFilterService extends BaseVaultFilterService {
|
||||
cipherService: CipherService,
|
||||
collectionService: CollectionService,
|
||||
policyService: PolicyService,
|
||||
private accountService: AccountService,
|
||||
) {
|
||||
super(
|
||||
stateService,
|
||||
@ -32,6 +34,10 @@ export class VaultFilterService extends BaseVaultFilterService {
|
||||
);
|
||||
this.vaultFilter.myVaultOnly = false;
|
||||
this.vaultFilter.selectedOrganizationId = null;
|
||||
|
||||
this.accountService.activeAccount$.subscribe((account) => {
|
||||
this.setVaultFilter(this.allVaults);
|
||||
});
|
||||
}
|
||||
|
||||
getVaultFilter() {
|
||||
|
Loading…
Reference in New Issue
Block a user