mirror of
https://github.com/bitwarden/browser
synced 2026-01-04 09:33:27 +00:00
[PM-5979] Refactor EnvironmentService (#8040)
Refactor environment service to emit a single observable. This required significant changes to how the environment service behaves and tackles much of the tech debt planned for it.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { app, Menu } from "electron";
|
||||
import { firstValueFrom } from "rxjs";
|
||||
|
||||
import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
@@ -45,7 +46,8 @@ export class MenuMain {
|
||||
}
|
||||
|
||||
private async getWebVaultUrl() {
|
||||
return this.environmentService.getWebVaultUrl() ?? cloudWebVaultUrl;
|
||||
const env = await firstValueFrom(this.environmentService.environment$);
|
||||
return env.getWebVaultUrl() ?? cloudWebVaultUrl;
|
||||
}
|
||||
|
||||
private initContextMenu() {
|
||||
|
||||
Reference in New Issue
Block a user