1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-23 11:43:46 +00:00

[PS-2120] Forcing vault to refresh when the vault is purged or new items are imported (#4380)

* [PS-2120] Forcing vault to refresh when the vault is purged or new items are imported

* [PS-2120] Forcing vault refresh by calling fullSync with force as true
This commit is contained in:
aj-rosado
2023-01-11 22:47:26 +00:00
committed by GitHub
parent 44851fe231
commit 51ead2e7da
3 changed files with 13 additions and 4 deletions

View File

@@ -10,6 +10,7 @@ import { ImportService } from "@bitwarden/common/abstractions/import.service";
import { LogService } from "@bitwarden/common/abstractions/log.service";
import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service";
import { PolicyService } from "@bitwarden/common/abstractions/policy/policy.service.abstraction";
import { SyncService } from "@bitwarden/common/abstractions/sync/sync.service.abstraction";
import { ImportOption, ImportType } from "@bitwarden/common/enums/importOptions";
import { PolicyType } from "@bitwarden/common/enums/policyType";
import { ImportError } from "@bitwarden/common/importers/import-error";
@@ -40,7 +41,8 @@ export class ImportComponent implements OnInit {
protected platformUtilsService: PlatformUtilsService,
protected policyService: PolicyService,
private logService: LogService,
protected modalService: ModalService
protected modalService: ModalService,
protected syncService: SyncService
) {}
async ngOnInit() {
@@ -133,6 +135,7 @@ export class ImportComponent implements OnInit {
//No errors, display success message
this.platformUtilsService.showToast("success", null, this.i18nService.t("importSuccess"));
this.syncService.fullSync(true);
this.router.navigate(this.successNavigate);
} catch (e) {
this.logService.error(e);