mirror of
https://github.com/bitwarden/browser
synced 2026-01-07 19:13:39 +00:00
[PM-5277] Migrate Sync Service to State Provider (#7680)
* [PM-5277] Introduce lastSync state via State Providers * [PM-5277] Add migrator and tests * [PM-5277] Use memory for web storage location * [PM-5277] Remove lastSync methods from state service * [PM-5277] Remove lastSync from AccountProfile * [PM-5277] Use string instead of Date to fix serialization for chrome.storage API in Browser * [PM-5277] Only set account if lastSync was deleted during migration * [PM-5277] Fix spec file
This commit is contained in:
@@ -139,10 +139,10 @@ import {
|
||||
VaultExportServiceAbstraction,
|
||||
} from "@bitwarden/exporter/vault-export";
|
||||
import {
|
||||
ImportApiServiceAbstraction,
|
||||
ImportApiService,
|
||||
ImportServiceAbstraction,
|
||||
ImportApiServiceAbstraction,
|
||||
ImportService,
|
||||
ImportServiceAbstraction,
|
||||
} from "@bitwarden/importer/core";
|
||||
|
||||
import { BrowserOrganizationService } from "../admin-console/services/browser-organization.service";
|
||||
@@ -634,6 +634,7 @@ export default class MainBackground {
|
||||
this.folderApiService,
|
||||
this.organizationService,
|
||||
this.sendApiService,
|
||||
this.stateProvider,
|
||||
logoutCallback,
|
||||
);
|
||||
this.eventUploadService = new EventUploadService(
|
||||
@@ -1009,7 +1010,7 @@ export default class MainBackground {
|
||||
await this.eventUploadService.uploadEvents(userId);
|
||||
|
||||
await Promise.all([
|
||||
this.syncService.setLastSync(new Date(0), userId),
|
||||
this.syncService.setLastSync(new Date(0), userId as UserId),
|
||||
this.cryptoService.clearKeys(userId),
|
||||
this.settingsService.clear(userId),
|
||||
this.cipherService.clear(userId),
|
||||
|
||||
Reference in New Issue
Block a user