mirror of
https://github.com/bitwarden/jslib
synced 2025-12-10 13:23:15 +00:00
Refactor SystemService
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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
|
||||
) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user