Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-02-01 17:06:21 +08:00
parent 8f08104f37
commit 37fa165f59
9 changed files with 21 additions and 39 deletions

View File

@@ -180,10 +180,7 @@ abstract class CommonDynPageState<T extends StatefulWidget> extends State<T>
replyLevel: 1,
replyReply: (replyItem, id) =>
replyReply(context, replyItem, id, theme),
onReply: (replyItem) => controller.onReply(
context,
replyItem: replyItem,
),
onReply: controller.onReply,
onDelete: (item, subIndex) =>
controller.onRemove(index, item, subIndex),
upMid: controller.upMid,
@@ -323,7 +320,7 @@ abstract class CommonDynPageState<T extends StatefulWidget> extends State<T>
try {
feedBack();
controller.onReply(
context,
null,
oid: controller.oid,
replyType: controller.replyType,
);

View File

@@ -12,7 +12,6 @@ import 'package:PiliPlus/utils/feed_back.dart';
import 'package:PiliPlus/utils/reply_utils.dart';
import 'package:PiliPlus/utils/request_utils.dart';
import 'package:PiliPlus/utils/storage_pref.dart';
import 'package:PiliPlus/utils/utils.dart';
import 'package:fixnum/fixnum.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
@@ -123,9 +122,8 @@ abstract class ReplyController<R> extends CommonListController<R, ReplyInfo> {
}
void onReply(
BuildContext context, {
ReplyInfo? replyItem, {
int? oid,
ReplyInfo? replyItem,
int? replyType,
}) {
if (loadingState.value case Error(:final errMsg, :final code)) {
@@ -143,7 +141,7 @@ abstract class ReplyController<R> extends CommonListController<R, ReplyInfo> {
}
final key = oid ?? replyItem!.oid + replyItem.id;
Navigator.of(context)
Get.key.currentState!
.push(
PublishRoute(
pageBuilder: (buildContext, animation, secondaryAnimation) {
@@ -167,10 +165,7 @@ abstract class ReplyController<R> extends CommonListController<R, ReplyInfo> {
},
);
},
settings: RouteSettings(
arguments: Get.arguments,
name: '${Get.currentRoute}-copy-${Utils.generateRandomString(3)}',
),
settings: RouteSettings(arguments: Get.arguments),
),
)
.then(

View File

@@ -162,9 +162,7 @@ class _LiveHeaderControlState extends State<LiveHeaderControl>
return;
}
if (await Floating().isPipAvailable) {
plPlayerController
..showControls.value = false
..enterPip();
plPlayerController.enterPip();
}
},
icon: const Icon(

View File

@@ -95,7 +95,7 @@ class _MainReplyPageState extends State<MainReplyPage> {
try {
feedBack();
_controller.onReply(
context,
null,
oid: _controller.oid,
replyType: _controller.replyType,
);
@@ -143,10 +143,7 @@ class _MainReplyPageState extends State<MainReplyPage> {
replyLevel: 1,
replyReply: (replyItem, id) =>
replyReply(context, replyItem, id, colorScheme),
onReply: (replyItem) => _controller.onReply(
context,
replyItem: replyItem,
),
onReply: _controller.onReply,
onDelete: (item, subIndex) =>
_controller.onRemove(index, item, subIndex),
upMid: _controller.upMid,

View File

@@ -148,7 +148,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
onPressed: () {
feedBack();
_videoReplyController.onReply(
context,
null,
oid: _videoReplyController.aid,
replyType: _videoReplyController.videoType.replyType,
);
@@ -204,10 +204,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
replyItem: response[index],
replyLevel: widget.replyLevel,
replyReply: replyReply,
onReply: (replyItem) => _videoReplyController.onReply(
context,
replyItem: replyItem,
),
onReply: _videoReplyController.onReply,
onDelete: (item, subIndex) =>
_videoReplyController.onRemove(index, item, subIndex),
upMid: _videoReplyController.upMid,

View File

@@ -156,9 +156,8 @@ class VideoReplyReplyController extends ReplyController
@override
void onReply(
BuildContext context, {
ReplyInfo? replyItem, {
int? oid,
ReplyInfo? replyItem,
int? replyType,
int? index,
}) {
@@ -173,7 +172,7 @@ class VideoReplyReplyController extends ReplyController
final root = replyItem.id.toInt();
final key = oid + root;
Navigator.of(context)
Get.key.currentState!
.push(
PublishRoute(
pageBuilder: (buildContext, animation, secondaryAnimation) {

View File

@@ -224,11 +224,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel>
replyItem: firstFloor,
replyLevel: 2,
needDivider: false,
onReply: (replyItem) => _controller.onReply(
context,
replyItem: replyItem,
index: -1,
),
onReply: (replyItem) => _controller.onReply(replyItem, index: -1),
upMid: _controller.upMid,
onCheckReply: (item) =>
_controller.onCheckReply(item, isManual: true),
@@ -366,8 +362,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel>
return ReplyItemGrpc(
replyItem: replyItem,
replyLevel: isDialogue ? 3 : 2,
onReply: (replyItem) =>
_controller.onReply(this.context, replyItem: replyItem, index: index),
onReply: (replyItem) => _controller.onReply(replyItem, index: index),
onDelete: (item, subIndex) => _controller.onRemove(index, item, null),
upMid: _controller.upMid,
showDialogue: () => Scaffold.of(context).showBottomSheet(

View File

@@ -2079,7 +2079,6 @@ class HeaderControlState extends State<HeaderControl>
return;
}
if (await Floating().isPipAvailable) {
plPlayerController.showControls.value = false;
if (context.mounted &&
!videoPlayerServiceHandler!.enableBackgroundPlay) {
final theme = Theme.of(context);