|
@ -1,5 +1,6 @@ |
|
|
'use strict'; |
|
|
'use strict'; |
|
|
import { Command, Disposable, Event, TreeItem, TreeItemCollapsibleState, TreeViewVisibilityChangeEvent } from 'vscode'; |
|
|
import { Command, Disposable, Event, TreeItem, TreeItemCollapsibleState, TreeViewVisibilityChangeEvent } from 'vscode'; |
|
|
|
|
|
import { Container } from '../../container'; |
|
|
import { |
|
|
import { |
|
|
GitFile, |
|
|
GitFile, |
|
|
GitReference, |
|
|
GitReference, |
|
@ -322,12 +323,17 @@ export abstract class RepositoryFolderNode< |
|
|
return RepositoryFolderNode.getId(this.repo.path); |
|
|
return RepositoryFolderNode.getId(this.repo.path); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
getTreeItem(): TreeItem | Promise<TreeItem> { |
|
|
|
|
|
|
|
|
async getTreeItem(): Promise<TreeItem> { |
|
|
this.splatted = false; |
|
|
this.splatted = false; |
|
|
|
|
|
|
|
|
|
|
|
let expand = this.repo.starred; |
|
|
|
|
|
if (!expand) { |
|
|
|
|
|
expand = await Container.git.isActiveRepoPath(this.uri.repoPath); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const item = new TreeItem( |
|
|
const item = new TreeItem( |
|
|
this.repo.formattedName ?? this.uri.repoPath ?? '', |
|
|
this.repo.formattedName ?? this.uri.repoPath ?? '', |
|
|
TreeItemCollapsibleState.Expanded, |
|
|
|
|
|
|
|
|
expand ? TreeItemCollapsibleState.Expanded : TreeItemCollapsibleState.Collapsed, |
|
|
); |
|
|
); |
|
|
item.contextValue = `${ContextValues.RepositoryFolder}${this.repo.starred ? '+starred' : ''}`; |
|
|
item.contextValue = `${ContextValues.RepositoryFolder}${this.repo.starred ? '+starred' : ''}`; |
|
|
item.tooltip = `${ |
|
|
item.tooltip = `${ |
|
|