fix(electron): should not send switchSplitView event when clicking on the active view (#7944)

This commit is contained in:
pengx17
2024-08-22 05:26:29 +00:00
parent 592150638e
commit 2f02f0da2b

View File

@@ -133,6 +133,9 @@ const WorkbenchTab = ({
);
const onActivateView = useAsyncCallback(
async (viewIdx: number) => {
if (viewIdx === activeViewIndex && tabActive) {
return;
}
await tabsHeaderService.activateView?.(workbench.id, viewIdx);
if (tabActive) {
track.$.appTabsHeader.$.tabAction({
@@ -146,7 +149,7 @@ const WorkbenchTab = ({
});
}
},
[tabActive, tabsHeaderService, workbench.id]
[activeViewIndex, tabActive, tabsHeaderService, workbench.id]
);
const handleAuxClick: MouseEventHandler = useCatchEventCallback(
async e => {