|
15 | 15 | ********************************************************************************/ |
16 | 16 |
|
17 | 17 | import { inject, injectable, named } from 'inversify'; |
18 | | -import { ContributionProvider, CommandRegistry, MenuModelRegistry, isOSX } from '../common'; |
| 18 | +import { ContributionProvider, CommandRegistry, MenuModelRegistry, isOSX, ClientConnectionNotifier } from '../common'; |
19 | 19 | import { MaybePromise } from '../common/types'; |
20 | 20 | import { KeybindingRegistry } from './keybinding'; |
21 | 21 | import { Widget } from './widgets'; |
@@ -129,7 +129,8 @@ export class FrontendApplication { |
129 | 129 | @inject(ContributionProvider) @named(FrontendApplicationContribution) |
130 | 130 | protected readonly contributions: ContributionProvider<FrontendApplicationContribution>, |
131 | 131 | @inject(ApplicationShell) protected readonly _shell: ApplicationShell, |
132 | | - @inject(FrontendApplicationStateService) protected readonly stateService: FrontendApplicationStateService |
| 132 | + @inject(FrontendApplicationStateService) protected readonly stateService: FrontendApplicationStateService, |
| 133 | + @inject(ClientConnectionNotifier) protected readonly connectionNotifier: ClientConnectionNotifier |
133 | 134 | ) { } |
134 | 135 |
|
135 | 136 | get shell(): ApplicationShell { |
@@ -258,9 +259,10 @@ export class FrontendApplication { |
258 | 259 | const startupElem = this.getStartupIndicator(host); |
259 | 260 | if (startupElem) { |
260 | 261 | return new Promise(resolve => { |
261 | | - window.requestAnimationFrame(() => { |
| 262 | + window.requestAnimationFrame(async () => { |
262 | 263 | startupElem.classList.add('theia-hidden'); |
263 | 264 | console.log(`Finished loading frontend application after ${(performance.now() / 1000).toFixed(3)} seconds`); |
| 265 | + await this.connectionNotifier.clientConnected(); |
264 | 266 | const preloadStyle = window.getComputedStyle(startupElem); |
265 | 267 | const transitionDuration = parseCssTime(preloadStyle.transitionDuration, 0); |
266 | 268 | window.setTimeout(() => { |
|
0 commit comments