1
1
mirror of https://github.com/Eugeny/tabby.git synced 2025-01-08 19:57:28 +03:00

Dont emit destroyed event when we're closing all tabs. This is to ensure we don't save the state of our open tabs innapropriately

This commit is contained in:
Austin Warren 2019-07-17 17:10:22 -07:00
parent a735c910d5
commit 041a2a92d5

View File

@ -147,13 +147,15 @@ export abstract class BaseTabComponent {
/**
* Called before the tab is closed
*/
destroy (): void {
destroy (skipDestroyedEvent = false): void {
this.focused.complete()
this.blurred.complete()
this.titleChange.complete()
this.progress.complete()
this.recoveryStateChangedHint.complete()
this.destroyed.next()
if (!skipDestroyedEvent) {
this.destroyed.next()
}
this.destroyed.complete()
}
}