@@ -4,7 +4,7 @@ import { Injectable } from '@angular/core';
4
4
import { Subject } from 'rxjs/Subject' ;
5
5
import { ReplaySubject } from 'rxjs/ReplaySubject' ;
6
6
7
- import { PinPartInfo , GetStartupInfo , NotificationInfo , NotificationStartedInfo , DataMessage , BladeResult } from './../models/portal' ;
7
+ import { PinPartInfo , GetStartupInfo , NotificationInfo , NotificationStartedInfo , DataMessage , BladeResult , DirtyStateInfo } from './../models/portal' ;
8
8
import { Event , Data , Verbs , Action , LogEntryLevel , Message , UpdateBladeInfo , OpenBladeInfo , StartupInfo , TimerEvent } from '../models/portal' ;
9
9
import { ErrorEvent } from '../models/error-event' ;
10
10
import { BroadcastService } from './broadcast.service' ;
@@ -308,10 +308,20 @@ export class PortalService {
308
308
this . postMessage ( Verbs . logAction , actionStr ) ;
309
309
}
310
310
311
+ // Deprecated
311
312
setDirtyState ( dirty : boolean ) : void {
312
313
this . postMessage ( Verbs . setDirtyState , JSON . stringify ( dirty ) ) ;
313
314
}
314
315
316
+ updateDirtyState ( dirty : boolean , message ?: string ) : void {
317
+ const info : DirtyStateInfo = {
318
+ dirty : dirty ,
319
+ message : message
320
+ } ;
321
+
322
+ this . postMessage ( Verbs . updateDirtyState , JSON . stringify ( info ) ) ;
323
+ }
324
+
315
325
logMessage ( level : LogEntryLevel , message : string , ...restArgs : any [ ] ) {
316
326
const messageStr = JSON . stringify ( < Message > {
317
327
level : level ,
0 commit comments