Merge branch 'fix'

This commit is contained in:
guozhigq
2024-12-01 13:01:14 +08:00
4 changed files with 20 additions and 5 deletions

View File

@ -20,7 +20,6 @@ import '../../../models/video/reply/item.dart';
import '../widgets/dynamic_panel.dart'; import '../widgets/dynamic_panel.dart';
class DynamicDetailPage extends StatefulWidget { class DynamicDetailPage extends StatefulWidget {
// const DynamicDetailPage({super.key});
const DynamicDetailPage({Key? key}) : super(key: key); const DynamicDetailPage({Key? key}) : super(key: key);
@override @override
@ -90,19 +89,22 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
_dynamicDetailController = Get.put( _dynamicDetailController = Get.put(
DynamicDetailController(oid, replyType), DynamicDetailController(oid, replyType),
tag: opusId.toString()); tag: opusId.toString());
_futureBuilderFuture = _dynamicDetailController.queryReplyList();
await _dynamicDetailController.reqHtmlByOpusId(opusId!); await _dynamicDetailController.reqHtmlByOpusId(opusId!);
setState(() {}); setState(() {});
} }
} else { } else {
oid = moduleDynamic.major!.draw!.id!; oid = moduleDynamic.major!.draw!.id!;
} }
} catch (_) {} } catch (err) {
print('err:${err.toString()}');
}
} }
if (!isOpusId) { if (!isOpusId) {
_dynamicDetailController = _dynamicDetailController =
Get.put(DynamicDetailController(oid, replyType), tag: oid.toString()); Get.put(DynamicDetailController(oid, replyType), tag: oid.toString());
_futureBuilderFuture ??= _dynamicDetailController.queryReplyList();
} }
_futureBuilderFuture = _dynamicDetailController.queryReplyList();
} }
// 查看二级评论 // 查看二级评论
@ -132,7 +134,7 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
// 分页加载 // 分页加载
if (scrollController.position.pixels >= if (scrollController.position.pixels >=
scrollController.position.maxScrollExtent - 300) { scrollController.position.maxScrollExtent - 300) {
EasyThrottle.throttle('replylist', const Duration(seconds: 2), () { EasyThrottle.throttle('replyList', const Duration(seconds: 2), () {
_dynamicDetailController.onLoad(); _dynamicDetailController.onLoad();
}); });
} }

View File

@ -70,6 +70,13 @@ class VideoReplyController extends GetxController {
isEnd = res['data'].cursor.isEnd ?? false; isEnd = res['data'].cursor.isEnd ?? false;
nextOffset = res['data'].cursor.paginationReply.nextOffset ?? ""; nextOffset = res['data'].cursor.paginationReply.nextOffset ?? "";
if (replies.isNotEmpty) { if (replies.isNotEmpty) {
/// 临时修复
final bool flag = replyList
.any((ReplyItemModel reply) => reply.rpid == replies.first.rpid);
if (replies.length == 1 && flag) {
replies.clear();
isEnd = true;
}
noMore.value = isEnd ? '没有更多了' : '加载中...'; noMore.value = isEnd ? '没有更多了' : '加载中...';
} else { } else {
noMore.value = noMore.value =

View File

@ -685,6 +685,11 @@ class _VideoDetailPageState extends State<VideoDetailPage>
canPop: canPop:
plPlayerController?.isFullScreen.value != true, plPlayerController?.isFullScreen.value != true,
onPopInvoked: (bool didPop) { onPopInvoked: (bool didPop) {
if (plPlayerController?.controlsLock.value ==
true) {
plPlayerController?.onLockControl(false);
return;
}
if (plPlayerController?.isFullScreen.value == if (plPlayerController?.isFullScreen.value ==
true) { true) {
plPlayerController! plPlayerController!

View File

@ -917,7 +917,7 @@ class PlPlayerController {
if (videoType == 'live') { if (videoType == 'live') {
return; return;
} }
if (controlsLock.value) { if (_controlsLock.value) {
return; return;
} }
_doubleSpeedStatus.value = val; _doubleSpeedStatus.value = val;
@ -1093,6 +1093,7 @@ class PlPlayerController {
videoFitChangedTimer?.cancel(); videoFitChangedTimer?.cancel();
// _position.close(); // _position.close();
_playerEventSubs?.cancel(); _playerEventSubs?.cancel();
_controlsLock.value = false;
// _sliderPosition.close(); // _sliderPosition.close();
// _sliderTempPosition.close(); // _sliderTempPosition.close();
// _isSliderMoving.close(); // _isSliderMoving.close();