Skip to content

Commit

Permalink
[PM-2347] Refresh feature flags when environment urls change (#2538)
Browse files Browse the repository at this point in the history
cherrypicked from: c7fd113
  • Loading branch information
andrebispo5 committed May 25, 2023
1 parent 74e9914 commit ab12046
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/App/Pages/Accounts/HomePageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ await _stateService.IsAuthenticatedAsync(userId))

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 };
Expand All @@ -185,6 +186,7 @@ public async Task ShowEnvironmentPickerAsync()
}
await _environmentService.SetUrlsAsync(result == AppResources.EU ? EnvironmentUrlData.DefaultEU : EnvironmentUrlData.DefaultUS);
await _configService.GetAsync(true);
SelectedEnvironmentName = result;
});
}
Expand All @@ -210,6 +212,7 @@ public async Task UpdateEnvironment()
}
else
{
await _configService.GetAsync(true);
SelectedEnvironmentName = AppResources.SelfHosted;
}
}
Expand Down

0 comments on commit ab12046

Please sign in to comment.