Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-09-27 11:30:29 +08:00
parent e3e6bb0e39
commit 0ebb2afe39
2 changed files with 77 additions and 53 deletions

View File

@@ -10,6 +10,7 @@ import 'package:PiliPlus/pages/video/reply/widgets/reply_item_grpc.dart';
import 'package:PiliPlus/pages/video/reply_reply/view.dart';
import 'package:PiliPlus/utils/feed_back.dart';
import 'package:easy_debounce/easy_throttle.dart';
import 'package:extended_nested_scroll_view/extended_nested_scroll_view.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:get/get.dart';
@@ -92,7 +93,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
Widget build(BuildContext context) {
super.build(context);
final theme = Theme.of(context);
return refreshIndicator(
final child = refreshIndicator(
onRefresh: _videoReplyController.onRefresh,
child: Stack(
clipBehavior: Clip.none,
@@ -182,6 +183,13 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
],
),
);
if (widget.isNested) {
return ExtendedVisibilityDetector(
uniqueKey: const Key('reply-list'),
child: child,
);
}
return child;
}
Widget _buildBody(

View File

@@ -946,7 +946,11 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
child: videoTabBarView(
controller: videoDetailController.tabCtr,
children: [
videoIntro(isHorizontal: false, needCtr: false),
videoIntro(
isHorizontal: false,
needCtr: false,
isNested: true,
),
if (videoDetailController.showReply)
videoReplyPanel(isNested: true),
if (_shouldShowSeasonPanel) seasonPanel,
@@ -1815,10 +1819,12 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
bool? isHorizontal,
bool needRelated = true,
bool needCtr = true,
bool isNested = false,
}) {
final bottom = MediaQuery.viewPaddingOf(context).bottom;
Widget introPanel() => KeepAliveWrapper(
builder: (context) => CustomScrollView(
builder: (context) {
final child = CustomScrollView(
controller: needCtr ? introScrollController : null,
physics: !needCtr
? const AlwaysScrollableScrollPhysics(
@@ -1837,7 +1843,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
isHorizontal: isHorizontal ?? width! > height! * 1.25,
),
if (needRelated &&
videoDetailController.plPlayerController.showRelatedVideo) ...[
videoDetailController
.plPlayerController
.showRelatedVideo) ...[
SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.only(top: StyleString.safeSpace),
@@ -1873,7 +1881,15 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
),
),
],
),
);
if (isNested) {
return ExtendedVisibilityDetector(
uniqueKey: const Key('intro-panel'),
child: child,
);
}
return child;
},
);
if (videoDetailController.isPlayAll) {
return Stack(