1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-27 12:36:14 +01:00

reinit notifications after setting urls

This commit is contained in:
Kyle Spearrin 2018-08-20 17:00:39 -04:00
parent 9bd8b73e27
commit 7cae08a55b

View File

@ -4,6 +4,7 @@ import { ConstantsService } from './constants.service';
import { ApiService } from '../abstractions/api.service'; import { ApiService } from '../abstractions/api.service';
import { EnvironmentService as EnvironmentServiceAbstraction } from '../abstractions/environment.service'; import { EnvironmentService as EnvironmentServiceAbstraction } from '../abstractions/environment.service';
import { NotificationsService } from '../abstractions/notifications.service';
import { StorageService } from '../abstractions/storage.service'; import { StorageService } from '../abstractions/storage.service';
export class EnvironmentService implements EnvironmentServiceAbstraction { export class EnvironmentService implements EnvironmentServiceAbstraction {
@ -14,7 +15,8 @@ export class EnvironmentService implements EnvironmentServiceAbstraction {
iconsUrl: string; iconsUrl: string;
notificationsUrl: string; notificationsUrl: string;
constructor(private apiService: ApiService, private storageService: StorageService) {} constructor(private apiService: ApiService, private storageService: StorageService,
private notificationsService: NotificationsService) { }
getWebVaultUrl(): string { getWebVaultUrl(): string {
if (this.webVaultUrl != null) { if (this.webVaultUrl != null) {
@ -85,6 +87,7 @@ export class EnvironmentService implements EnvironmentServiceAbstraction {
} }
await this.apiService.setUrls(envUrls); await this.apiService.setUrls(envUrls);
this.notificationsService.init(this);
return urls; return urls;
} }