1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-10 13:23:15 +00:00

Refactor SystemService

This commit is contained in:
Thomas Rittson
2022-03-28 06:49:55 +10:00
parent ed78430158
commit b6c5e6ea1c
2 changed files with 6 additions and 1 deletions

View File

@@ -9,3 +9,4 @@ export const STATE_FACTORY = new InjectionToken<StateFactory>("STATE_FACTORY");
export const SECURE_STORAGE = new InjectionToken<StorageService>("SECURE_STORAGE");
export const WINDOW_TOKEN = new InjectionToken<Window>("WINDOW");
export const CLIENT_TYPE = new InjectionToken<Window>("CLIENT_TYPE");
export const RELOAD_CALLBACK = new InjectionToken<Window>("RELOAD_CALLBACK");

View File

@@ -1,9 +1,13 @@
import { Inject, Injectable } from '@angular/core';
import { RELOAD_CALLBACK } from "../abstractions/injectionTokens";
import { MessagingService } from "../abstractions/messaging.service";
import { PlatformUtilsService } from "../abstractions/platformUtils.service";
import { StateService } from "../abstractions/state.service";
import { SystemService as SystemServiceAbstraction } from "../abstractions/system.service";
import { Utils } from "../misc/utils";
@Injectable()
export class SystemService implements SystemServiceAbstraction {
private reloadInterval: any = null;
private clearClipboardTimeout: any = null;
@@ -12,7 +16,7 @@ export class SystemService implements SystemServiceAbstraction {
constructor(
private messagingService: MessagingService,
private platformUtilsService: PlatformUtilsService,
private reloadCallback: () => Promise<void> = null,
@Inject(RELOAD_CALLBACK) private reloadCallback: () => Promise<void> = null,
private stateService: StateService
) {}