@@ -21,30 +21,13 @@ public class InitializationViewModel : ObservableObject
2121
2222 private readonly IThemeSelectorService _themeSelector ;
2323 private readonly IWidgetServiceService _widgetServiceService ;
24- private readonly IMicrosoftStoreService _msStoreService ;
25- private readonly IPackageDeploymentService _packageDeploymentService ;
26-
27- #if CANARY_BUILD
28- private const string GitHubExtensionStorePackageId = "9N806ZKPW85R" ;
29- private const string GitHubExtensionPackageFamilyName = "Microsoft.Windows.DevHomeGitHubExtension.Canary_8wekyb3d8bbwe" ;
30- #elif STABLE_BUILD
31- private const string GitHubExtensionStorePackageId = "9NZCC27PR6N6" ;
32- private const string GitHubExtensionPackageFamilyName = "Microsoft.Windows.DevHomeGitHubExtension_8wekyb3d8bbwe" ;
33- #else
34- private const string GitHubExtensionStorePackageId = "" ;
35- private const string GitHubExtensionPackageFamilyName = "" ;
36- #endif
3724
3825 public InitializationViewModel (
3926 IThemeSelectorService themeSelector ,
40- IWidgetServiceService widgetServiceService ,
41- IMicrosoftStoreService msStoreService ,
42- IPackageDeploymentService packageDeploymentService )
27+ IWidgetServiceService widgetServiceService )
4328 {
4429 _themeSelector = themeSelector ;
4530 _widgetServiceService = widgetServiceService ;
46- _msStoreService = msStoreService ;
47- _packageDeploymentService = packageDeploymentService ;
4831 }
4932
5033 public async void OnPageLoaded ( )
@@ -74,37 +57,11 @@ public async void OnPageLoaded()
7457 _log . Information ( ex , "Installing WidgetService failed: " ) ;
7558 }
7659
77- // Install the DevHomeGitHubExtension, unless it's already installed or a dev build is running.
78- if ( string . IsNullOrEmpty ( GitHubExtensionStorePackageId ) || HasDevHomeGitHubExtensionInstalled ( ) )
79- {
80- _log . Information ( "Skipping installing DevHomeGitHubExtension." ) ;
81- }
82- else
83- {
84- try
85- {
86- _log . Information ( "Installing DevHomeGitHubExtension..." ) ;
87- await _msStoreService . TryInstallPackageAsync ( GitHubExtensionStorePackageId ) ;
88- }
89- catch ( Exception ex )
90- {
91- _log . Information ( ex , "Installing DevHomeGitHubExtension failed: " ) ;
92- }
93- }
94-
9560 App . MainWindow . Content = Application . Current . GetService < ShellPage > ( ) ;
9661
9762 _themeSelector . SetRequestedTheme ( ) ;
9863
9964 TelemetryFactory . Get < ITelemetry > ( ) . Log ( "DevHome_Initialization_Ended_Event" , LogLevel . Critical , new DevHomeInitializationEndedEvent ( ) ) ;
10065 _log . Information ( "Dev Home Initialization ended." ) ;
10166 }
102-
103- private bool HasDevHomeGitHubExtensionInstalled ( )
104- {
105- var packages = _packageDeploymentService . FindPackagesForCurrentUser ( GitHubExtensionPackageFamilyName ) ;
106-
107- // Don't check here if the package is ok, we'll do that later on the Dashboard.
108- return packages . Any ( ) ;
109- }
11067}
0 commit comments