don't use timer if have warnings

closes #1658
pull/1676/head
Mikael Finstad 2023-07-19 00:11:10 +02:00
rodzic 1c1ed1e6b4
commit 5ee1df97fa
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 25AB36E3E81CBC26
2 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -73,7 +73,7 @@ import { formatDuration } from './util/duration';
import { adjustRate } from './util/rate-calculator';
import { askExtractFramesAsImages } from './dialogs/extractFrames';
import { askForHtml5ifySpeed } from './dialogs/html5ify';
import { askForOutDir, askForImportChapters, promptTimeOffset, askForFileOpenAction, confirmExtractAllStreamsDialog, showCleanupFilesDialog, showDiskFull, showExportFailedDialog, showConcatFailedDialog, openYouTubeChaptersDialog, showRefuseToOverwrite, openDirToast, openCutFinishedToast, openConcatFinishedToast, showOpenDialog } from './dialogs';
import { askForOutDir, askForImportChapters, promptTimeOffset, askForFileOpenAction, confirmExtractAllStreamsDialog, showCleanupFilesDialog, showDiskFull, showExportFailedDialog, showConcatFailedDialog, openYouTubeChaptersDialog, showRefuseToOverwrite, openDirToast, openExportFinishedToast, openConcatFinishedToast, showOpenDialog } from './dialogs';
import { openSendReportDialog } from './reporting';
import { fallbackLng } from './i18n';
import { createSegment, getCleanCutSegments, findSegmentsAtCursor, sortSegments, convertSegmentsToChapters, hasAnySegmentOverlap, isDurationValid, playOnlyCurrentSegment } from './segments';
@ -1174,7 +1174,7 @@ const App = memo(() => {
if (areWeCutting) notices.push(i18n.t('Cutpoints may be inaccurate.'));
const revealPath = concatOutPath || outFiles[0];
if (!hideAllNotifications) openCutFinishedToast({ filePath: revealPath, warnings, notices });
if (!hideAllNotifications) openExportFinishedToast({ filePath: revealPath, warnings, notices });
if (cleanupChoices.cleanupAfterExport) await cleanupFiles(cleanupChoices);
} catch (err) {

Wyświetl plik

@ -545,7 +545,7 @@ const Notices = ({ notices }) => notices.map((msg) => <ListItem key={msg} icon={
const Warnings = ({ warnings }) => warnings.map((msg) => <ListItem key={msg} icon={WarningSignIcon} iconColor="warning">{msg}</ListItem>);
const OutputIncorrectSeeHelpMenu = () => <ListItem icon={HelpIcon}>{i18n.t('If output does not look right, see the Help menu.')}</ListItem>;
export async function openCutFinishedToast({ filePath, warnings, notices }) {
export async function openExportFinishedToast({ filePath, warnings, notices }) {
const hasWarnings = warnings.length > 0;
const html = (
<UnorderedList>
@ -557,7 +557,7 @@ export async function openCutFinishedToast({ filePath, warnings, notices }) {
</UnorderedList>
);
await openDirToast({ filePath, html, width: 800, position: 'center', timer: 30000 });
await openDirToast({ filePath, html, width: 800, position: 'center', timer: hasWarnings ? undefined : 30000 });
}
export async function openConcatFinishedToast({ filePath, warnings, notices }) {