mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +00:00
[PM-14214] Initialize PopupViewCacheService earlier (#13540)
This commit is contained in:
@@ -24,7 +24,6 @@ import {
|
||||
import { BiometricsService, BiometricStateService } from "@bitwarden/key-management";
|
||||
|
||||
import { PopupCompactModeService } from "../platform/popup/layout/popup-compact-mode.service";
|
||||
import { PopupViewCacheService } from "../platform/popup/view-cache/popup-view-cache.service";
|
||||
import { initPopupClosedListener } from "../platform/services/popup-view-cache-background.service";
|
||||
import { VaultBrowserStateService } from "../vault/services/vault-browser-state.service";
|
||||
|
||||
@@ -43,7 +42,6 @@ import { DesktopSyncVerificationDialogComponent } from "./components/desktop-syn
|
||||
`,
|
||||
})
|
||||
export class AppComponent implements OnInit, OnDestroy {
|
||||
private viewCacheService = inject(PopupViewCacheService);
|
||||
private compactModeService = inject(PopupCompactModeService);
|
||||
|
||||
private lastActivity: Date;
|
||||
@@ -74,7 +72,6 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
|
||||
async ngOnInit() {
|
||||
initPopupClosedListener();
|
||||
await this.viewCacheService.init();
|
||||
|
||||
this.compactModeService.init();
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ import { StateService } from "@bitwarden/common/platform/abstractions/state.serv
|
||||
import { BrowserApi } from "../../platform/browser/browser-api";
|
||||
import BrowserPopupUtils from "../../platform/popup/browser-popup-utils";
|
||||
import { PopupSizeService } from "../../platform/popup/layout/popup-size.service";
|
||||
import { PopupViewCacheService } from "../../platform/popup/view-cache/popup-view-cache.service";
|
||||
|
||||
@Injectable()
|
||||
export class InitService {
|
||||
private sizeService = inject(PopupSizeService);
|
||||
@@ -24,6 +26,7 @@ export class InitService {
|
||||
private logService: LogServiceAbstraction,
|
||||
private themingService: AbstractThemingService,
|
||||
private sdkLoadService: SdkLoadService,
|
||||
private viewCacheService: PopupViewCacheService,
|
||||
@Inject(DOCUMENT) private document: Document,
|
||||
) {}
|
||||
|
||||
@@ -33,7 +36,7 @@ export class InitService {
|
||||
await this.stateService.init({ runMigrations: false }); // Browser background is responsible for migrations
|
||||
await this.i18nService.init();
|
||||
this.twoFactorService.init();
|
||||
|
||||
await this.viewCacheService.init();
|
||||
await this.sizeService.init();
|
||||
|
||||
const htmlEl = window.document.documentElement;
|
||||
|
||||
Reference in New Issue
Block a user