mirror of
https://github.com/Eugeny/tabby
synced 2024-11-14 17:07:15 +00:00
fixed #4586 - fix disableDynamicTabTitle to work with switch-profile
This commit is contained in:
parent
ed71b499b9
commit
3923e46f22
2 changed files with 10 additions and 8 deletions
|
@ -483,6 +483,7 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit
|
|||
newTab.parent = this
|
||||
this.recoveryStateChangedHint.next()
|
||||
this.onAfterTabAdded(newTab)
|
||||
this.updateTitle()
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -37,13 +37,6 @@ export class ProfilesService {
|
|||
if (params) {
|
||||
const tab = this.app.openNewTab(params)
|
||||
;(this.app.getParentTab(tab) ?? tab).color = profile.color ?? null
|
||||
|
||||
if (profile.name) {
|
||||
tab.setTitle(profile.name)
|
||||
}
|
||||
if (profile.disableDynamicTitle) {
|
||||
tab['disableDynamicTitle'] = true
|
||||
}
|
||||
return tab
|
||||
}
|
||||
return null
|
||||
|
@ -51,7 +44,15 @@ export class ProfilesService {
|
|||
|
||||
async newTabParametersForProfile <P extends Profile> (profile: PartialProfile<P>): Promise<NewTabParameters<BaseTabComponent>|null> {
|
||||
const fullProfile = this.getConfigProxyForProfile(profile)
|
||||
return this.providerForProfile(fullProfile)?.getNewTabParameters(fullProfile) ?? null
|
||||
const params = await this.providerForProfile(fullProfile)?.getNewTabParameters(fullProfile) ?? null
|
||||
if (params) {
|
||||
params.inputs ??= {}
|
||||
params.inputs['title'] = profile.name
|
||||
if (profile.disableDynamicTitle) {
|
||||
params.inputs['disableDynamicTitle'] = true
|
||||
}
|
||||
}
|
||||
return params
|
||||
}
|
||||
|
||||
getProviders (): ProfileProvider<Profile>[] {
|
||||
|
|
Loading…
Reference in a new issue