mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-09 22:10:09 +00: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:
parent
a735c910d5
commit
041a2a92d5
@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user