mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-21 16:48:43 +00: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,10 +1819,12 @@ 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) {
|
||||||
|
final child = CustomScrollView(
|
||||||
controller: needCtr ? introScrollController : null,
|
controller: needCtr ? introScrollController : null,
|
||||||
physics: !needCtr
|
physics: !needCtr
|
||||||
? const AlwaysScrollableScrollPhysics(
|
? const AlwaysScrollableScrollPhysics(
|
||||||
@@ -1837,7 +1843,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
isHorizontal: isHorizontal ?? width! > height! * 1.25,
|
isHorizontal: isHorizontal ?? width! > height! * 1.25,
|
||||||
),
|
),
|
||||||
if (needRelated &&
|
if (needRelated &&
|
||||||
videoDetailController.plPlayerController.showRelatedVideo) ...[
|
videoDetailController
|
||||||
|
.plPlayerController
|
||||||
|
.showRelatedVideo) ...[
|
||||||
SliverToBoxAdapter(
|
SliverToBoxAdapter(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.only(top: StyleString.safeSpace),
|
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) {
|
if (videoDetailController.isPlayAll) {
|
||||||
return Stack(
|
return Stack(
|
||||||
|
|||||||
Reference in New Issue
Block a user