mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-14 14:15:52 +03:00
fix(electron): should not send switchSplitView event when clicking on the active view (#7944)
This commit is contained in:
parent
592150638e
commit
2f02f0da2b
@ -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 => {
|
||||
|
Loading…
Reference in New Issue
Block a user