Skip to content

Commit 14b115a

Browse files
Expands Current branch group and item in Launchpad View
1 parent db4e98d commit 14b115a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/views/launchpadView.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ export class LaunchpadItemNode extends CacheableChildrenViewNode<'launchpad-item
8484

8585
const item = new TreeItem(
8686
lpi.title.length > 60 ? `${lpi.title.substring(0, 60)}...` : lpi.title,
87-
TreeItemCollapsibleState.Collapsed,
87+
this.item.openRepository?.localBranch?.current
88+
? TreeItemCollapsibleState.Expanded
89+
: TreeItemCollapsibleState.Collapsed,
8890
);
8991
item.contextValue = ContextValues.LaunchpadItem;
9092
item.description = `\u00a0 ${lpi.repository.owner.login}/${lpi.repository.name}#${lpi.id} \u00a0 ${
@@ -160,7 +162,9 @@ export class LaunchpadViewNode extends CacheableChildrenViewNode<
160162
launchpadGroupLabelMap.get(ui)!,
161163
ui,
162164
groupItems.map(i => new LaunchpadItemNode(this.view, this, ui, i)),
163-
expanded.get(ui) ? TreeItemCollapsibleState.Expanded : TreeItemCollapsibleState.Collapsed,
165+
ui === 'current-branch' || expanded.get(ui)
166+
? TreeItemCollapsibleState.Expanded
167+
: TreeItemCollapsibleState.Collapsed,
164168
undefined,
165169
undefined,
166170
new ThemeIcon(icon.substring(2, icon.length - 1)),

0 commit comments

Comments
 (0)