@@ -43,7 +43,7 @@ export class StartupService {
4343 private fileHandlingService : FileHandlingService ,
4444 private mxGraphService : MxGraphService ,
4545 private translate : LanguageTranslationService ,
46- private ngZone : NgZone ,
46+ private ngZone : NgZone
4747 ) { }
4848
4949 listenForLoading ( ) {
@@ -62,8 +62,8 @@ export class StartupService {
6262 } ) ,
6363 take ( 1 ) ,
6464 switchMap ( ( { isFirstWindow, model} ) =>
65- ( isFirstWindow ? this . migratorService . startMigrating ( ) : of ( null ) ) . pipe ( switchMap ( ( ) => this . loadModel ( model ) ) ) ,
66- ) ,
65+ ( isFirstWindow ? this . migratorService . startMigrating ( ) : of ( null ) ) . pipe ( switchMap ( ( ) => this . loadModel ( model ) ) )
66+ )
6767 )
6868 . subscribe ( ( ) => {
6969 this . sidebarService . workspace . refresh ( ) ;
@@ -73,11 +73,12 @@ export class StartupService {
7373
7474 loadModel ( model : string ) : Observable < any > {
7575 let options : StartupPayload ;
76- this . loadingScreenService . open ( {
77- title : this . translate . language . LOADING_SCREEN_DIALOG . MODEL_LOADING ,
78- content : this . translate . language . LOADING_SCREEN_DIALOG . MODEL_LOADING_WAIT ,
79- } ) ;
80-
76+ this . ngZone . run ( ( ) =>
77+ this . loadingScreenService . open ( {
78+ title : this . translate . language . LOADING_SCREEN_DIALOG . MODEL_LOADING ,
79+ content : this . translate . language . LOADING_SCREEN_DIALOG . MODEL_LOADING_WAIT ,
80+ } )
81+ ) ;
8182 return this . electronSignalsService . call ( 'requestWindowData' ) . pipe (
8283 tap ( data => ( options = data . options ) ) ,
8384 switchMap ( ( ) =>
@@ -89,13 +90,13 @@ export class StartupService {
8990 fromWorkspace : options ?. fromWorkspace ,
9091 editElementUrn : options ?. editElement ,
9192 } )
92- : of ( this . fileHandlingService . createEmptyModel ( ) ) ,
93- ) ,
93+ : of ( this . fileHandlingService . createEmptyModel ( ) )
94+ )
9495 ) ,
9596 tap ( ( ) => {
9697 this . modelSaveTracker . updateSavedModel ( ) ;
9798 this . loadingScreenService . close ( ) ;
98- } ) ,
99+ } )
99100 ) ;
100101 }
101102}
0 commit comments