MCPcopy
hub / github.com/CapSoftware/Cap / flushPreviewConfigUpdate

Function flushPreviewConfigUpdate

apps/desktop/src/routes/editor/Editor.tsx:505–529  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

503 let pendingPreviewConfigUpdate: PreviewConfigUpdate | null = null;
504
505 const flushPreviewConfigUpdate = async () => {
506 if (previewConfigUpdateInFlight) return;
507 const next = pendingPreviewConfigUpdate;
508 if (!next) return;
509
510 pendingPreviewConfigUpdate = null;
511 previewConfigUpdateInFlight = true;
512
513 try {
514 await commands.updateProjectConfigInMemory(
515 next.config,
516 next.frameNumber,
517 FPS,
518 next.resolutionBase,
519 );
520 } catch (e) {
521 console.error(
522 "[Editor] doConfigUpdate - ERROR sending config to Rust:",
523 e,
524 );
525 } finally {
526 previewConfigUpdateInFlight = false;
527 if (pendingPreviewConfigUpdate) void flushPreviewConfigUpdate();
528 }
529 };
530
531 const doConfigUpdate = (time: number) => {
532 pendingPreviewConfigUpdate = {

Callers 1

doConfigUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected