@@ -100,7 +100,6 @@ import { ILabelService, LabelService } from 'vs/platform/label/common/label';
100100import { IDownloadService } from 'vs/platform/download/common/download' ;
101101import { DownloadService } from 'vs/platform/download/node/downloadService' ;
102102import { DownloadServiceChannel } from 'vs/platform/download/node/downloadIpc' ;
103- import { runWhenIdle } from 'vs/base/common/async' ;
104103import { TextResourcePropertiesService } from 'vs/workbench/services/textfile/electron-browser/textResourcePropertiesService' ;
105104import { MulitExtensionManagementService } from 'vs/platform/extensionManagement/node/multiExtensionManagement' ;
106105import { IRemoteAuthorityResolverService } from 'vs/platform/remote/common/remoteAuthorityResolver' ;
@@ -189,7 +188,7 @@ export class WorkbenchShell extends Disposable {
189188 this . logService . warn ( 'Workbench did not finish loading in 10 seconds, that might be a problem that should be reported.' ) ;
190189 } , 10000 ) ;
191190
192- this . lifecycleService . when ( LifecyclePhase . Running ) . then ( ( ) => {
191+ this . lifecycleService . when ( LifecyclePhase . Restored ) . then ( ( ) => {
193192 clearTimeout ( timeoutHandle ) ;
194193 } ) ;
195194 }
@@ -208,30 +207,16 @@ export class WorkbenchShell extends Disposable {
208207 try {
209208 const workbench = instantiationService . createInstance ( Workbench , container , this . configuration , serviceCollection , this . lifecycleService , this . mainProcessClient ) ;
210209
211- // Set lifecycle phase to `Restoring`
212- this . lifecycleService . phase = LifecyclePhase . Restoring ;
213-
214210 // Startup Workbench
215211 workbench . startup ( ) . then ( startupInfos => {
216212
217- // Set lifecycle phase to `Runnning`
218- this . lifecycleService . phase = LifecyclePhase . Running ;
219-
220213 // Startup Telemetry
221214 this . logStartupTelemetry ( startupInfos ) ;
222215
223216 // Storage Telemetry (TODO@Ben remove me later, including storage errors)
224217 if ( ! this . environmentService . extensionTestsPath ) {
225218 this . logStorageTelemetry ( ) ;
226219 }
227-
228- // Set lifecycle phase to `Runnning For A Bit` after a short delay
229- let eventuallPhaseTimeoutHandle = runWhenIdle ( ( ) => {
230- eventuallPhaseTimeoutHandle = void 0 ;
231- this . lifecycleService . phase = LifecyclePhase . Eventually ;
232- } , 5000 ) ;
233-
234- this . _register ( eventuallPhaseTimeoutHandle ) ;
235220 } , error => handleStartupError ( this . logService , error ) ) ;
236221
237222 return workbench ;
@@ -546,6 +531,9 @@ export class WorkbenchShell extends Disposable {
546531
547532 // Listeners
548533 this . registerListeners ( ) ;
534+
535+ // Set lifecycle phase to `Ready`
536+ this . lifecycleService . phase = LifecyclePhase . Ready ;
549537 }
550538
551539 private registerListeners ( ) : void {
0 commit comments