Skip to content

Commit 0325b2a

Browse files
authored
Merge pull request #9479 from gitbutlerapp/avoid-redundant-branch-update
Avoid redundant branch update on generation
2 parents b9ea776 + 6391eea commit 0325b2a

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

apps/desktop/src/components/BranchHeaderContextMenu.svelte

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import { projectAiGenEnabled } from '$lib/config/config';
2929
import { DefaultForgeFactory } from '$lib/forge/forgeFactory.svelte';
3030
import { StackService } from '$lib/stacks/stackService.svelte';
31-
import { UiState } from '$lib/state/uiState.svelte';
3231
import { TestId } from '$lib/testing/testIds';
3332
import { openExternalUrl } from '$lib/utils/url';
3433
import { inject } from '@gitbutler/shared/context';
@@ -46,12 +45,11 @@
4645
4746
let { projectId, stackId, context = $bindable(), openId: openId = $bindable() }: Props = $props();
4847
49-
const [aiService, stackService, forge, promptService, uiState] = inject(
48+
const [aiService, stackService, forge, promptService] = inject(
5049
AIService,
5150
StackService,
5251
DefaultForgeFactory,
53-
PromptService,
54-
UiState
52+
PromptService
5553
);
5654
const [insertBlankCommitInBranch, commitInsertion] = stackService.insertBlankCommit;
5755
const [updateBranchNameMutation] = stackService.updateBranchName;
@@ -108,12 +106,6 @@
108106
branchName,
109107
newName: newBranchName
110108
});
111-
112-
// Select the new branch name in the UI
113-
if (stackId) {
114-
uiState.stack(stackId).selection.set({ branchName: newBranchName });
115-
uiState.project(projectId).stackId.set(stackId);
116-
}
117109
}
118110
}
119111

0 commit comments

Comments
 (0)