this.setupEventListener(options);
this.mainWindow = new WRTWindow(this.getWindowOption(options));
- this.initDisplayDelay(true);
+ this.initDisplayDelay();
this.setupMainWindowEventListener();
}
});
}
- private initDisplayDelay(firstLaunch: boolean) {
- // TODO: On 6.0, this causes a black screen on relaunch
- if (firstLaunch)
- this.firstRendered = false;
+ private enableWindow() {
this.suspended = false;
+ // TODO: On 6.0, this causes a black screen on relaunch
if (this.showTimer)
clearTimeout(this.showTimer);
- let splashShown = this.preloadStatus !== 'preload' && firstLaunch && wrt.showSplashScreen();
- if (!splashShown && !wrt.tv) {
- this.showTimer = setTimeout(() => {
- if (!this.suspended) {
- console.log('FrameRendered not obtained from engine. To show window, timer fired');
- this.mainWindow.emit('ready-to-show');
- }
- }, 2000);
- }
- if (!firstLaunch && !this.backgroundRunnable())
+ if (!this.backgroundRunnable())
this.mainWindow.setEnabled(true);
}
+ private initDisplayDelay() {
+ let splashShown = this.preloadStatus !== 'preload' && wrt.showSplashScreen();
+ if (splashShown || wrt.tv)
+ return;
+
+ this.showTimer = setTimeout(() => {
+ if (!this.suspended) {
+ console.log('FrameRendered not obtained from engine. To show window, timer fired');
+ this.mainWindow.emit('ready-to-show');
+ }
+ }, 2000);
+ }
+
private backgroundRunnable(): boolean {
return this.backgroundSupport || this.backgroundExecution;
}
private handleAppControlReload(url: string) {
console.log('WebApplication : handleAppControlReload');
this.closeWindows();
- this.initDisplayDelay(false);
+ this.enableWindow();
this.mainWindow.loadURL(url);
}