fix: 修复图文动图播放被重置与进度停滞问题

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-04 01:41:47 +08:00
co-authored by Cursor
parent 10f2520279
commit bcf1e6e349
3 changed files with 83 additions and 75 deletions
+5 -1
View File
@@ -6,6 +6,7 @@ import {
type ReactElement,
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from "react";
@@ -111,7 +112,10 @@ export default function AwemeDetailClient({
}, []);
// 图文轮播状态
const images = isVideo ? [] : (data as ImageData).images;
const images = useMemo(
() => (isVideo ? [] : (data as ImageData).images),
[data, isVideo],
);
const imageCount = images.length;
const imageCarouselState = useImageCarousel({
images,