mirror of
https://github.com/stablyai/orca.git
synced 2026-10-18 08:03:22 +00:00
fix: skip redundant GitHub refresh when re-clicking active worktree
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
83cf02105f
commit
e4ccfc55fe
@@ -181,6 +181,7 @@ export const createWorktreeSlice: StateCreator<AppState, [], [], WorktreeSlice>
|
||||
|
||||
setActiveWorktree: (worktreeId) => {
|
||||
let shouldClearUnread = false
|
||||
const prevActiveId = get().activeWorktreeId
|
||||
set((s) => {
|
||||
if (!worktreeId) {
|
||||
return { activeWorktreeId: null }
|
||||
@@ -196,8 +197,8 @@ export const createWorktreeSlice: StateCreator<AppState, [], [], WorktreeSlice>
|
||||
}
|
||||
})
|
||||
|
||||
// Refresh GitHub data (PR + issue status) for the activated worktree
|
||||
if (worktreeId) {
|
||||
// Refresh GitHub data (PR + issue status) when switching to a different worktree
|
||||
if (worktreeId && worktreeId !== prevActiveId) {
|
||||
get().refreshGitHubForWorktree(worktreeId)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user