grpc search archive

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-04-24 10:48:51 +08:00
parent 5b5983ed50
commit 490a08fa79
8 changed files with 303 additions and 39 deletions

View File

@@ -198,10 +198,25 @@ class VideoDetailController extends GetxController
@pragma('vm:notify-debugger-on-exception')
void setVideoHeight() {
try {
final isVertical = firstVideo.width != null && firstVideo.height != null
? firstVideo.width! < firstVideo.height!
: false;
if (!scrollCtr.hasClients) {
var width = firstVideo.width;
var height = firstVideo.height;
if (width == null || height == null) {
if (isUgc && !isFileSource) {
final ugcIntroCtr = Get.find<UgcIntroController>(tag: heroTag);
final data = ugcIntroCtr.videoDetail.value;
if (data.cid == cid.value) {
width = data.dimension!.width!;
height = data.dimension!.height!;
} else {
ugcIntroCtr.queryVideoIntro().whenComplete(setVideoHeight);
return;
}
} else {
return;
}
}
final isVertical = height > width;
if (_scrollCtr?.hasClients != true) {
videoHeight = isVertical ? maxVideoHeight : minVideoHeight;
this.isVertical.value = isVertical;
return;
@@ -298,11 +313,7 @@ class VideoDetailController extends GetxController
defaultST = Duration.zero;
}
data = PlayUrlModel(timeLength: entry.totalTimeMilli);
if (isInit) {
Future.delayed(const Duration(milliseconds: 120), setVideoHeight);
} else {
setVideoHeight();
}
setVideoHeight();
}
@override