|
|
|
|
@ -959,6 +959,8 @@ const App = memo(() => {
|
|
|
|
|
setBatchFiles([]);
|
|
|
|
|
}, [askBeforeClose]);
|
|
|
|
|
|
|
|
|
|
const removeBatchFile = useCallback((path) => setBatchFiles((existingBatch) => existingBatch.filter((existingFile) => existingFile.path !== path)), []);
|
|
|
|
|
|
|
|
|
|
const cleanupFiles = useCallback(async () => {
|
|
|
|
|
// Because we will reset state before deleting files
|
|
|
|
|
const saved = { previewFilePath, filePath, edlFilePath };
|
|
|
|
|
@ -978,6 +980,8 @@ const App = memo(() => {
|
|
|
|
|
|
|
|
|
|
if (workingRef.current) return;
|
|
|
|
|
|
|
|
|
|
removeBatchFile(saved.filePath);
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
setWorking(i18n.t('Cleaning up'));
|
|
|
|
|
|
|
|
|
|
@ -1008,7 +1012,7 @@ const App = memo(() => {
|
|
|
|
|
} finally {
|
|
|
|
|
setWorking();
|
|
|
|
|
}
|
|
|
|
|
}, [filePath, previewFilePath, closeFile, edlFilePath, cleanupChoices, setWorking]);
|
|
|
|
|
}, [previewFilePath, filePath, edlFilePath, closeFile, cleanupChoices, removeBatchFile, setWorking]);
|
|
|
|
|
|
|
|
|
|
const outSegments = useMemo(() => (invertCutSegments ? inverseCutSegments : apparentCutSegments),
|
|
|
|
|
[invertCutSegments, inverseCutSegments, apparentCutSegments]);
|
|
|
|
|
|