diff --git a/tools/Environments/DevHome.Environments/ViewModels/ComputeSystemViewModel.cs b/tools/Environments/DevHome.Environments/ViewModels/ComputeSystemViewModel.cs index 2ab0189b89..2ba1f1975b 100644 --- a/tools/Environments/DevHome.Environments/ViewModels/ComputeSystemViewModel.cs +++ b/tools/Environments/DevHome.Environments/ViewModels/ComputeSystemViewModel.cs @@ -171,11 +171,12 @@ private async Task InitializeOperationDataAsync() // Only show dot operations when there are items in the list. ShouldShowDotOperations = DotOperations.Count > 0; + + // Only show Launch split button with operations when there are items in the list. + ShouldShowSplitButton = LaunchOperations.Count > 0; }); }); - // Only show Launch split button with operations when there are items in the list. - ShouldShowSplitButton = LaunchOperations.Count > 0; SetPropertiesAsync(); } finally @@ -184,7 +185,7 @@ private async Task InitializeOperationDataAsync() } } - private async Task RefreshOperationDataAsync(ComputeSystemState newState) + private async Task RefreshOperationDataAsync() { ComputeSystem.ResetSupportedOperations(); var supportedOperations = ComputeSystem.SupportedOperations?.Value ?? ComputeSystemOperations.None; @@ -200,12 +201,7 @@ private async Task RefreshOperationDataAsync(ComputeSystemState newState) } ComputeSystem.ResetComputeSystemProperties(); - ShouldShowDotOperations = false; - - if (newState != ComputeSystemState.Saving) - { - await InitializeOperationDataAsync(); - } + await InitializeOperationDataAsync(); } private async Task InitializeStateAsync() @@ -250,7 +246,7 @@ public void OnComputeSystemStateChanged(ComputeSystem sender, ComputeSystemState // So we need to rebuild the dot and launch operations that appear in the UI based on the current // supported operations of the compute system. InitializeOperationDataAsync will take care of this for us, by using // the DataExtractor helper. - await RefreshOperationDataAsync(newState); + await RefreshOperationDataAsync(); } }); }