diff --git a/lib/pages/video/controller.dart b/lib/pages/video/controller.dart index f3a55b502..0e9b23fa2 100644 --- a/lib/pages/video/controller.dart +++ b/lib/pages/video/controller.dart @@ -248,13 +248,15 @@ class VideoDetailController extends GetxController if (width == null || height == null) { if (isUgc && !isFileSource) { final ugcIntroCtr = Get.find(tag: heroTag); - final data = ugcIntroCtr.videoDetail.value; - if (data.cid == cid.value) { - final dimension = data.dimension!; + final cid = this.cid.value; + final part = ugcIntroCtr.videoDetail.value.pages?.firstWhereOrNull( + (e) => e.cid == cid, + ); + if (part != null) { + final dimension = part.dimension!; width = dimension.width!; height = dimension.height!; } else { - ugcIntroCtr.queryVideoIntro().whenComplete(_setVideoHeight); return; } } else {