mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-21 19:28:27 +08:00
committed by
GitHub
parent
08944241bb
commit
ccb61415f5
@@ -92,7 +92,7 @@ class _PlDanmakuState extends State<PlDanmaku> {
|
||||
return;
|
||||
}
|
||||
|
||||
if (playerController.playerStatus.status.value != PlayerStatus.playing) {
|
||||
if (!playerController.playerStatus.playing) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ class _MainAppState extends State<MainApp>
|
||||
void _onHideWindow() {
|
||||
if (_mainController.pauseOnMinimize) {
|
||||
_mainController.isPlaying =
|
||||
PlPlayerController.instance?.playerStatus.status.value ==
|
||||
PlPlayerController.instance?.playerStatus.value ==
|
||||
PlayerStatus.playing;
|
||||
PlPlayerController.pauseIfExists();
|
||||
}
|
||||
|
||||
@@ -993,8 +993,7 @@ class VideoDetailController extends GetxController
|
||||
SmartDialog.showToast('UP主已关闭弹幕');
|
||||
return;
|
||||
}
|
||||
bool isPlaying =
|
||||
plPlayerController.playerStatus.status.value == PlayerStatus.playing;
|
||||
final isPlaying = plPlayerController.playerStatus.playing;
|
||||
if (isPlaying) {
|
||||
await plPlayerController.pause();
|
||||
}
|
||||
@@ -1580,8 +1579,7 @@ class VideoDetailController extends GetxController
|
||||
|
||||
void makeHeartBeat() {
|
||||
if (plPlayerController.enableHeart &&
|
||||
plPlayerController.playerStatus.status.value !=
|
||||
PlayerStatus.completed &&
|
||||
!plPlayerController.playerStatus.completed &&
|
||||
playedTime != null) {
|
||||
try {
|
||||
plPlayerController.makeHeartBeat(
|
||||
|
||||
@@ -2,12 +2,14 @@ import 'package:PiliPlus/common/skeleton/video_reply.dart';
|
||||
import 'package:PiliPlus/common/widgets/custom_sliver_persistent_header_delegate.dart';
|
||||
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
||||
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
||||
import 'package:PiliPlus/common/widgets/view_safe_area.dart';
|
||||
import 'package:PiliPlus/grpc/bilibili/main/community/reply/v1.pb.dart'
|
||||
show ReplyInfo, Mode;
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/pages/common/slide/common_slide_page.dart';
|
||||
import 'package:PiliPlus/pages/video/reply/widgets/reply_item_grpc.dart';
|
||||
import 'package:PiliPlus/pages/video/reply_reply/controller.dart';
|
||||
import 'package:PiliPlus/utils/app_scheme.dart';
|
||||
import 'package:PiliPlus/utils/num_utils.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:extended_nested_scroll_view/extended_nested_scroll_view.dart';
|
||||
@@ -44,6 +46,51 @@ class VideoReplyReplyPanel extends CommonSlidePage {
|
||||
|
||||
@override
|
||||
State<VideoReplyReplyPanel> createState() => _VideoReplyReplyPanelState();
|
||||
|
||||
static Future<void>? toReply(
|
||||
int oid,
|
||||
int rootId,
|
||||
String? rpIdStr,
|
||||
int type,
|
||||
Uri? uri,
|
||||
) {
|
||||
final rpId = rpIdStr == null ? null : int.tryParse(rpIdStr);
|
||||
return Get.to(
|
||||
arguments: {
|
||||
'oid': oid,
|
||||
'rpid': rootId,
|
||||
'id': ?rpId,
|
||||
'type': type,
|
||||
'enterUri': ?uri, // save panel
|
||||
},
|
||||
() => Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
title: const Text('评论详情'),
|
||||
actions: [
|
||||
IconButton(
|
||||
tooltip: '前往',
|
||||
onPressed: uri == null
|
||||
? null
|
||||
: () => PiliScheme.routePush(uri, businessId: type),
|
||||
icon: const Icon(Icons.open_in_new),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: ViewSafeArea(
|
||||
child: VideoReplyReplyPanel(
|
||||
enableSlide: false,
|
||||
oid: oid,
|
||||
rpid: rootId,
|
||||
isVideoDetail: false,
|
||||
replyType: type,
|
||||
firstFloor: null,
|
||||
id: rpId,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel>
|
||||
|
||||
@@ -379,7 +379,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
introController.canelTimer();
|
||||
|
||||
videoDetailController
|
||||
..playerStatus = plPlayerController?.playerStatus.status.value
|
||||
..playerStatus = plPlayerController?.playerStatus.value
|
||||
..brightness = plPlayerController?.brightness.value;
|
||||
if (plPlayerController != null) {
|
||||
videoDetailController.makeHeartBeat();
|
||||
@@ -406,8 +406,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
WidgetsBinding.instance.addObserver(this);
|
||||
|
||||
plPlayerController?.isLive = false;
|
||||
if (videoDetailController.plPlayerController.playerStatus.status.value ==
|
||||
PlayerStatus.playing &&
|
||||
if (videoDetailController.plPlayerController.playerStatus.playing &&
|
||||
videoDetailController.playerStatus != PlayerStatus.playing) {
|
||||
videoDetailController.plPlayerController.pause();
|
||||
}
|
||||
@@ -608,7 +607,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
videoDetailController.isCollapsing
|
||||
? animHeight
|
||||
: videoDetailController.isCollapsing ||
|
||||
plPlayerController?.playerStatus.status.value ==
|
||||
plPlayerController?.playerStatus.value ==
|
||||
PlayerStatus.playing
|
||||
? videoDetailController.minVideoHeight
|
||||
: kToolbarHeight;
|
||||
@@ -724,7 +723,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
Text(
|
||||
'${videoDetailController.playedTime == null
|
||||
? '立即'
|
||||
: plPlayerController!.playerStatus.status.value == PlayerStatus.completed
|
||||
: plPlayerController!.playerStatus.completed
|
||||
? '重新'
|
||||
: '继续'}播放',
|
||||
style: TextStyle(
|
||||
|
||||
Reference in New Issue
Block a user