cancel execution on file change (#1440)
This commit is contained in:
@ -36,6 +36,7 @@ import { sep } from '@tauri-apps/api/path'
|
||||
import { homeCommandBarConfig } from 'lib/commandBarConfigs/homeCommandConfig'
|
||||
import { useHotkeys } from 'react-hotkeys-hook'
|
||||
import { isTauri } from 'lib/isTauri'
|
||||
import { kclManager } from 'lang/KclSingleton'
|
||||
|
||||
// This route only opens in the Tauri desktop context for now,
|
||||
// as defined in Router.tsx, so we can use the Tauri APIs and types.
|
||||
@ -55,6 +56,7 @@ const Home = () => {
|
||||
// during the loading of the home page. This is wrapped
|
||||
// in a single-use effect to avoid a potential infinite loop.
|
||||
useEffect(() => {
|
||||
kclManager.cancelAllExecutions()
|
||||
if (newDefaultDirectory) {
|
||||
sendToSettings({
|
||||
type: 'Set Default Directory',
|
||||
|
Reference in New Issue
Block a user