Skip to content

Commit 558d498

Browse files
authored
Merge pull request #7897 from gitbutlerapp/e-branch-3
Focus the branch correctly on clicking the branch header
2 parents 48a09e9 + 6a8c8a5 commit 558d498

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

apps/desktop/src/components/v3/BranchCard.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@
111111
{isNewBranch}
112112
readonly={!!forgeBranch}
113113
onclick={() => {
114-
uiState.stack(stackId).selection.set({ branchName });
114+
const stackState = uiState.stack(stackId);
115+
stackState.selection.set({ branchName });
116+
stackState.activeSelectionId.set({ type: 'branch', branchName, stackId });
115117
uiState.project(projectId).drawerPage.set('branch');
116118
}}
117119
onMenuBtnClick={() => {

apps/desktop/src/components/v3/FileList.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
{listMode}
9090
selected={idSelection.has(change.path, selectionId)}
9191
onclick={(e) => {
92+
stackState?.activeSelectionId.set(selectionId);
9293
selectFilesInList(e, change, visibleFiles, idSelection, true, idx, selectionId);
9394
}}
9495
/>

0 commit comments

Comments
 (0)