1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-11-10 12:16:34 +03:00

expose sessionChanged$

This commit is contained in:
Eugene Pankov 2021-03-10 20:51:44 +01:00
parent 975b5a117d
commit 0c963dcbcc
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4

View File

@ -90,6 +90,7 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
protected logger: Logger protected logger: Logger
protected output = new Subject<string>() protected output = new Subject<string>()
protected sessionChanged = new Subject<BaseSession|null>()
private sessionCloseSubscription: Subscription private sessionCloseSubscription: Subscription
private hotkeysSubscription: Subscription private hotkeysSubscription: Subscription
private bellPlayer: HTMLAudioElement private bellPlayer: HTMLAudioElement
@ -122,6 +123,8 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
get frontendReady$ (): Observable<void> { return this.frontendReady } get frontendReady$ (): Observable<void> { return this.frontendReady }
get sessionChanged$ (): Observable<BaseSession|null> { return this.sessionChanged }
constructor (protected injector: Injector) { constructor (protected injector: Injector) {
super() super()
@ -581,6 +584,7 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
this.detachSessionHandlers() this.detachSessionHandlers()
this.session = null this.session = null
} }
this.sessionChanged.next(session)
} }
protected attachSessionHandler (subscription: Subscription): void { protected attachSessionHandler (subscription: Subscription): void {