diff --git a/src/ViewModels/InitializationViewModel.cs b/src/ViewModels/InitializationViewModel.cs index 7acac1b84b..a8a176591d 100644 --- a/src/ViewModels/InitializationViewModel.cs +++ b/src/ViewModels/InitializationViewModel.cs @@ -21,30 +21,13 @@ public class InitializationViewModel : ObservableObject private readonly IThemeSelectorService _themeSelector; private readonly IWidgetServiceService _widgetServiceService; - private readonly IMicrosoftStoreService _msStoreService; - private readonly IPackageDeploymentService _packageDeploymentService; - -#if CANARY_BUILD - private const string GitHubExtensionStorePackageId = "9N806ZKPW85R"; - private const string GitHubExtensionPackageFamilyName = "Microsoft.Windows.DevHomeGitHubExtension.Canary_8wekyb3d8bbwe"; -#elif STABLE_BUILD - private const string GitHubExtensionStorePackageId = "9NZCC27PR6N6"; - private const string GitHubExtensionPackageFamilyName = "Microsoft.Windows.DevHomeGitHubExtension_8wekyb3d8bbwe"; -#else - private const string GitHubExtensionStorePackageId = ""; - private const string GitHubExtensionPackageFamilyName = ""; -#endif public InitializationViewModel( IThemeSelectorService themeSelector, - IWidgetServiceService widgetServiceService, - IMicrosoftStoreService msStoreService, - IPackageDeploymentService packageDeploymentService) + IWidgetServiceService widgetServiceService) { _themeSelector = themeSelector; _widgetServiceService = widgetServiceService; - _msStoreService = msStoreService; - _packageDeploymentService = packageDeploymentService; } public async void OnPageLoaded() @@ -74,24 +57,6 @@ public async void OnPageLoaded() _log.Information(ex, "Installing WidgetService failed: "); } - // Install the DevHomeGitHubExtension, unless it's already installed or a dev build is running. - if (string.IsNullOrEmpty(GitHubExtensionStorePackageId) || HasDevHomeGitHubExtensionInstalled()) - { - _log.Information("Skipping installing DevHomeGitHubExtension."); - } - else - { - try - { - _log.Information("Installing DevHomeGitHubExtension..."); - await _msStoreService.TryInstallPackageAsync(GitHubExtensionStorePackageId); - } - catch (Exception ex) - { - _log.Information(ex, "Installing DevHomeGitHubExtension failed: "); - } - } - App.MainWindow.Content = Application.Current.GetService(); _themeSelector.SetRequestedTheme(); @@ -99,12 +64,4 @@ public async void OnPageLoaded() TelemetryFactory.Get().Log("DevHome_Initialization_Ended_Event", LogLevel.Critical, new DevHomeInitializationEndedEvent()); _log.Information("Dev Home Initialization ended."); } - - private bool HasDevHomeGitHubExtensionInstalled() - { - var packages = _packageDeploymentService.FindPackagesForCurrentUser(GitHubExtensionPackageFamilyName); - - // Don't check here if the package is ok, we'll do that later on the Dashboard. - return packages.Any(); - } }