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:
parent
a735c910d5
commit
041a2a92d5
@ -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()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user