mirror of
https://github.com/Eugeny/tabby.git
synced 2025-04-06 16:00:28 +08:00
tab closing fix
This commit is contained in:
parent
0d4ebe3d96
commit
c10e5e918f
@ -32,12 +32,18 @@ export class TouchbarService {
|
||||
let activityIcon = this.electron.nativeImage.createFromPath(activityIconPath)
|
||||
app.tabOpened$.subscribe(tab => {
|
||||
tab.titleChange$.subscribe(title => {
|
||||
this.tabSegments[app.tabs.indexOf(tab)].label = this.shortenTitle(title)
|
||||
this.tabsSegmentedControl.segments = this.tabSegments
|
||||
let segment = this.tabSegments[app.tabs.indexOf(tab)]
|
||||
if (segment) {
|
||||
segment.label = this.shortenTitle(title)
|
||||
this.tabsSegmentedControl.segments = this.tabSegments
|
||||
}
|
||||
})
|
||||
tab.activity$.subscribe(hasActivity => {
|
||||
let showIcon = this.app.activeTab !== tab && hasActivity
|
||||
this.tabSegments[app.tabs.indexOf(tab)].icon = showIcon ? activityIcon : null
|
||||
let segment = this.tabSegments[app.tabs.indexOf(tab)]
|
||||
if (segment) {
|
||||
segment.icon = showIcon ? activityIcon : null
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user