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 * Called before the tab is closed
*/ */
destroy (): void { destroy (skipDestroyedEvent = false): void {
this.focused.complete() this.focused.complete()
this.blurred.complete() this.blurred.complete()
this.titleChange.complete() this.titleChange.complete()
this.progress.complete() this.progress.complete()
this.recoveryStateChangedHint.complete() this.recoveryStateChangedHint.complete()
this.destroyed.next() if (!skipDestroyedEvent) {
this.destroyed.next()
}
this.destroyed.complete() this.destroyed.complete()
} }
} }