From 0894c305ad59eaed7fd031cc6acff593e899d56f Mon Sep 17 00:00:00 2001 From: Eugene Date: Mon, 11 Mar 2024 21:10:39 +0100 Subject: [PATCH] fixed #9482 - dragged-in panes going to sleep after some time --- .gitignore | 1 + tabby-core/src/components/baseTab.component.ts | 8 ++++---- tabby-core/src/components/splitTab.component.ts | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 464a01a557..103bc1cdc8 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ tabby-ssh/util/pagent.exe *.psd crowdin.yml +.crowdin.env diff --git a/tabby-core/src/components/baseTab.component.ts b/tabby-core/src/components/baseTab.component.ts index 1435665d61..43cfb45fa8 100644 --- a/tabby-core/src/components/baseTab.component.ts +++ b/tabby-core/src/components/baseTab.component.ts @@ -1,4 +1,4 @@ -import { Observable, Subject, distinctUntilChanged, filter, debounceTime } from 'rxjs' +import { Observable, Subject, BehaviorSubject, distinctUntilChanged, filter, debounceTime } from 'rxjs' import { EmbeddedViewRef, Injector, ViewContainerRef, ViewRef } from '@angular/core' import { RecoveryToken } from '../api/tabRecovery' import { BaseComponent } from './base.component' @@ -75,9 +75,9 @@ export abstract class BaseTabComponent extends BaseComponent { private titleChange = new Subject() private focused = new Subject() private blurred = new Subject() - private visibility = new Subject() - private progress = new Subject() - private activity = new Subject() + protected visibility = new BehaviorSubject(false) + protected progress = new BehaviorSubject(null) + protected activity = new BehaviorSubject(false) private destroyed = new Subject() private _destroyCalled = false diff --git a/tabby-core/src/components/splitTab.component.ts b/tabby-core/src/components/splitTab.component.ts index 66ba2daecd..a2c428e2d4 100644 --- a/tabby-core/src/components/splitTab.component.ts +++ b/tabby-core/src/components/splitTab.component.ts @@ -471,6 +471,8 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit } tab.removeFromContainer() tab.parent = this + + tab.emitVisibility(this.visibility.value) } let target = relative ? this.getParentOf(relative) : null