1
0
mirror of https://github.com/bitwarden/jslib synced 2026-01-04 17:43:14 +00:00

[EC-159] [BEEEP] Remove factory providers in Angular DI (#775)

This commit is contained in:
Thomas Rittson
2022-04-26 07:28:43 +10:00
committed by GitHub
parent 5c88dcf0cc
commit e40e7de808
4 changed files with 58 additions and 139 deletions

View File

@@ -11,17 +11,14 @@ import { ThemeType } from "jslib-common/enums/themeType";
import { isDev, isMacAppStore } from "../utils";
export class ElectronPlatformUtilsService implements PlatformUtilsService {
private clientType: ClientType;
private deviceCache: DeviceType = null;
constructor(
protected i18nService: I18nService,
private messagingService: MessagingService,
private isDesktopApp: boolean,
private clientType: ClientType.Desktop | ClientType.DirectoryConnector,
private stateService: StateService
) {
this.clientType = isDesktopApp ? ClientType.Desktop : ClientType.DirectoryConnector;
}
) {}
getDevice(): DeviceType {
if (!this.deviceCache) {