Keep thumbnail timing aligned with committed playback

This commit is contained in:
webadderall
2026-09-02 17:38:47 +10:00
parent cab234d4f7
commit 9e73be8d81
@@ -1,5 +1,5 @@
/* biome-ignore-all lint/correctness/useExhaustiveDependencies: grouped editor domain objects contain the thumbnail renderer dependencies. */
import { type RefObject, useCallback, useRef } from "react";
import { type RefObject, useCallback, useEffect, useRef } from "react";
import { FrameRenderer } from "@/lib/exporter";
import { toFileUrl } from "../projectPersistence";
import type { useAppearanceState } from "../state/useAppearanceState";
@@ -26,7 +26,9 @@ export function useProjectLibraryController({
effectiveShowCursor,
}: Input) {
const currentTimeRef = useRef(currentTime);
currentTimeRef.current = currentTime;
useEffect(() => {
currentTimeRef.current = currentTime;
}, [currentTime]);
const { setProjectLibraryEntries } = project;
const {
backgroundBlur,