fix: address remaining ui overhaul review feedback

This commit is contained in:
webadderall committed 2026-04-17 00:27:46 +10:00
1 parent b03753f8e8
commit f58bf90dfa
1 file changed
+1 -5
+1 -5
View File
@@ -136,10 +136,6 @@ export interface ClipRegion {
muted?: boolean;
}
export function getClipSourceEndMs(clip: ClipRegion): number {
return Math.round(Math.max(clip.startMs, clip.endMs));
}
/** Convert clip regions (kept segments) to trim regions (gaps to remove). */
export function clipsToTrims(clips: ClipRegion[], totalDurationMs: number): TrimRegion[] {
if (clips.length === 0) return [];
@@ -151,7 +147,7 @@ export function clipsToTrims(clips: ClipRegion[], totalDurationMs: number): Trim
if (clip.startMs > cursor) {
trims.push({ id: `trim-gap-${trimId++}`, startMs: cursor, endMs: clip.startMs });
}
cursor = getClipSourceEndMs(clip);
cursor = clip.endMs;
}
if (cursor < totalDurationMs) {
trims.push({ id: `trim-gap-${trimId++}`, startMs: cursor, endMs: totalDurationMs });