mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -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/pages/video/reply_reply/view.dart';
|
||||||
import 'package:PiliPlus/utils/feed_back.dart';
|
import 'package:PiliPlus/utils/feed_back.dart';
|
||||||
import 'package:easy_debounce/easy_throttle.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/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -92,7 +93,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
super.build(context);
|
super.build(context);
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
return refreshIndicator(
|
final child = refreshIndicator(
|
||||||
onRefresh: _videoReplyController.onRefresh,
|
onRefresh: _videoReplyController.onRefresh,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
clipBehavior: Clip.none,
|
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(
|
Widget _buildBody(
|
||||||
|
|||||||
@@ -946,7 +946,11 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
child: videoTabBarView(
|
child: videoTabBarView(
|
||||||
controller: videoDetailController.tabCtr,
|
controller: videoDetailController.tabCtr,
|
||||||
children: [
|
children: [
|
||||||
videoIntro(isHorizontal: false, needCtr: false),
|
videoIntro(
|
||||||
|
isHorizontal: false,
|
||||||
|
needCtr: false,
|
||||||
|
isNested: true,
|
||||||
|
),
|
||||||
if (videoDetailController.showReply)
|
if (videoDetailController.showReply)
|
||||||
videoReplyPanel(isNested: true),
|
videoReplyPanel(isNested: true),
|
||||||
if (_shouldShowSeasonPanel) seasonPanel,
|
if (_shouldShowSeasonPanel) seasonPanel,
|
||||||
@@ -1815,65 +1819,77 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
bool? isHorizontal,
|
bool? isHorizontal,
|
||||||
bool needRelated = true,
|
bool needRelated = true,
|
||||||
bool needCtr = true,
|
bool needCtr = true,
|
||||||
|
bool isNested = false,
|
||||||
}) {
|
}) {
|
||||||
final bottom = MediaQuery.viewPaddingOf(context).bottom;
|
final bottom = MediaQuery.viewPaddingOf(context).bottom;
|
||||||
Widget introPanel() => KeepAliveWrapper(
|
Widget introPanel() => KeepAliveWrapper(
|
||||||
builder: (context) => CustomScrollView(
|
builder: (context) {
|
||||||
controller: needCtr ? introScrollController : null,
|
final child = CustomScrollView(
|
||||||
physics: !needCtr
|
controller: needCtr ? introScrollController : null,
|
||||||
? const AlwaysScrollableScrollPhysics(
|
physics: !needCtr
|
||||||
parent: ClampingScrollPhysics(),
|
? const AlwaysScrollableScrollPhysics(
|
||||||
)
|
parent: ClampingScrollPhysics(),
|
||||||
: null,
|
)
|
||||||
slivers: [
|
: null,
|
||||||
if (videoDetailController.isUgc) ...[
|
slivers: [
|
||||||
UgcIntroPanel(
|
if (videoDetailController.isUgc) ...[
|
||||||
key: videoIntroKey,
|
UgcIntroPanel(
|
||||||
heroTag: heroTag,
|
key: videoIntroKey,
|
||||||
showAiBottomSheet: showAiBottomSheet,
|
heroTag: heroTag,
|
||||||
showEpisodes: showEpisodes,
|
showAiBottomSheet: showAiBottomSheet,
|
||||||
onShowMemberPage: onShowMemberPage,
|
showEpisodes: showEpisodes,
|
||||||
isPortrait: isPortrait,
|
onShowMemberPage: onShowMemberPage,
|
||||||
isHorizontal: isHorizontal ?? width! > height! * 1.25,
|
isPortrait: isPortrait,
|
||||||
),
|
isHorizontal: isHorizontal ?? width! > height! * 1.25,
|
||||||
if (needRelated &&
|
),
|
||||||
videoDetailController.plPlayerController.showRelatedVideo) ...[
|
if (needRelated &&
|
||||||
SliverToBoxAdapter(
|
videoDetailController
|
||||||
child: Padding(
|
.plPlayerController
|
||||||
padding: const EdgeInsets.only(top: StyleString.safeSpace),
|
.showRelatedVideo) ...[
|
||||||
child: Divider(
|
SliverToBoxAdapter(
|
||||||
height: 1,
|
child: Padding(
|
||||||
indent: 12,
|
padding: const EdgeInsets.only(top: StyleString.safeSpace),
|
||||||
endIndent: 12,
|
child: Divider(
|
||||||
color: themeData.colorScheme.outline.withValues(
|
height: 1,
|
||||||
alpha: 0.08,
|
indent: 12,
|
||||||
|
endIndent: 12,
|
||||||
|
color: themeData.colorScheme.outline.withValues(
|
||||||
|
alpha: 0.08,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
RelatedVideoPanel(key: videoRelatedKey, heroTag: heroTag),
|
||||||
|
],
|
||||||
|
] else
|
||||||
|
PgcIntroPage(
|
||||||
|
key: videoIntroKey,
|
||||||
|
heroTag: heroTag,
|
||||||
|
cid: videoDetailController.cid.value,
|
||||||
|
showEpisodes: showEpisodes,
|
||||||
|
showIntroDetail: showIntroDetail,
|
||||||
|
maxWidth: width ?? maxWidth,
|
||||||
|
isLandscape: !isPortrait,
|
||||||
|
),
|
||||||
|
SliverToBoxAdapter(
|
||||||
|
child: SizedBox(
|
||||||
|
height:
|
||||||
|
(videoDetailController.isPlayAll && !isPortrait
|
||||||
|
? 80
|
||||||
|
: StyleString.safeSpace) +
|
||||||
|
bottom,
|
||||||
),
|
),
|
||||||
RelatedVideoPanel(key: videoRelatedKey, heroTag: heroTag),
|
|
||||||
],
|
|
||||||
] else
|
|
||||||
PgcIntroPage(
|
|
||||||
key: videoIntroKey,
|
|
||||||
heroTag: heroTag,
|
|
||||||
cid: videoDetailController.cid.value,
|
|
||||||
showEpisodes: showEpisodes,
|
|
||||||
showIntroDetail: showIntroDetail,
|
|
||||||
maxWidth: width ?? maxWidth,
|
|
||||||
isLandscape: !isPortrait,
|
|
||||||
),
|
),
|
||||||
SliverToBoxAdapter(
|
],
|
||||||
child: SizedBox(
|
);
|
||||||
height:
|
if (isNested) {
|
||||||
(videoDetailController.isPlayAll && !isPortrait
|
return ExtendedVisibilityDetector(
|
||||||
? 80
|
uniqueKey: const Key('intro-panel'),
|
||||||
: StyleString.safeSpace) +
|
child: child,
|
||||||
bottom,
|
);
|
||||||
),
|
}
|
||||||
),
|
return child;
|
||||||
],
|
},
|
||||||
),
|
|
||||||
);
|
);
|
||||||
if (videoDetailController.isPlayAll) {
|
if (videoDetailController.isPlayAll) {
|
||||||
return Stack(
|
return Stack(
|
||||||
|
|||||||
Reference in New Issue
Block a user