优化事件处理

This commit is contained in:
xintaofei
2026-03-08 17:08:31 +08:00
parent 7a4cbcb73e
commit c1220e1a8f
12 changed files with 178 additions and 64 deletions

View File

@@ -80,6 +80,7 @@ import {
openCommitWindow,
setFolderParentBranch,
} from "@/lib/tauri"
import { disposeTauriListener } from "@/lib/tauri-listener"
import type { GitBranchList } from "@/lib/types"
import { toast } from "sonner"
import { useFolderContext } from "@/contexts/folder-context"
@@ -161,7 +162,7 @@ export function BranchDropdown({
})
return () => {
if (unlisten) unlisten()
disposeTauriListener(unlisten, "BranchDropdown.gitCommitSucceeded")
}
}, [folder, onBranchChange, t])