From c7fd113f2605cc1d4ca0ff6671c8fa549aabe4d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bispo?= Date: Thu, 25 May 2023 14:37:53 +0100 Subject: [PATCH] [PM-2347] Refresh feature flags when environment urls change (#2538) --- src/App/Pages/Accounts/HomePageViewModel.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/App/Pages/Accounts/HomePageViewModel.cs b/src/App/Pages/Accounts/HomePageViewModel.cs index f0ac6e699..d212f4f7b 100644 --- a/src/App/Pages/Accounts/HomePageViewModel.cs +++ b/src/App/Pages/Accounts/HomePageViewModel.cs @@ -165,6 +165,7 @@ namespace Bit.App.Pages public async Task ShowEnvironmentPickerAsync() { + _displayEuEnvironment = await _configService.GetFeatureFlagBoolAsync(Constants.DisplayEuEnvironmentFlag); var options = _displayEuEnvironment ? new string[] { AppResources.US, AppResources.EU, AppResources.SelfHosted } : new string[] { AppResources.US, AppResources.SelfHosted }; @@ -185,6 +186,7 @@ namespace Bit.App.Pages } await _environmentService.SetUrlsAsync(result == AppResources.EU ? EnvironmentUrlData.DefaultEU : EnvironmentUrlData.DefaultUS); + await _configService.GetAsync(true); SelectedEnvironmentName = result; }); } @@ -210,6 +212,7 @@ namespace Bit.App.Pages } else { + await _configService.GetAsync(true); SelectedEnvironmentName = AppResources.SelfHosted; } }