chore: 合入 dev 最新提交(#1241 Git Graph 分页去重)

This commit is contained in:
Menghuan1918 committed 2026-11-26 11:42:40 +08:00
commit 8d59fbe44e
4 files changed
+46 -4

No files matched your search

+8 -4
View File
@@ -245,10 +245,14 @@ export function GitGraphSection({ scope, worktree, visible, refreshTick = 0, onP
}
if (controller.signal.aborted || gen !== generation.current) return
if (!append) setLinearFallback(fallback)
const next = append && previous ? {
...result,
entries: [...previous.entries, ...result.entries.filter(entry => !previous.entries.some(old => old.hashFull === entry.hashFull))],
} : result
let next = result
if (append && previous) {
const previousHashes = new Set(previous.entries.map(entry => entry.hashFull))
next = {
...result,
entries: [...previous.entries, ...result.entries.filter(entry => !previousHashes.has(entry.hashFull))],
}
}
pageRef.current = next
setPage(next)
setBranches(next.branches)