mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 08:08:19 +08:00
deprecate replytype
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -6,7 +6,6 @@ import 'package:PiliPlus/grpc/bilibili/main/community/reply/v1.pb.dart'
|
||||
show ReplyInfo;
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/models/common/reply/reply_sort_type.dart';
|
||||
import 'package:PiliPlus/models/common/reply/reply_type.dart';
|
||||
import 'package:PiliPlus/pages/video/reply/controller.dart';
|
||||
import 'package:PiliPlus/pages/video/reply/widgets/reply_item_grpc.dart';
|
||||
import 'package:PiliPlus/utils/feed_back.dart';
|
||||
@@ -175,7 +174,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
||||
_videoReplyController.onReply(
|
||||
context,
|
||||
oid: _videoReplyController.aid,
|
||||
replyType: ReplyType.video,
|
||||
replyType: 1,
|
||||
);
|
||||
},
|
||||
tooltip: '发表评论',
|
||||
@@ -239,7 +238,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
||||
_videoReplyController.onToggleTop(
|
||||
index,
|
||||
_videoReplyController.aid,
|
||||
ReplyType.video.index,
|
||||
1,
|
||||
isUpTop,
|
||||
rpid,
|
||||
),
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:PiliPlus/common/widgets/button/toolbar_icon_button.dart';
|
||||
import 'package:PiliPlus/grpc/bilibili/main/community/reply/v1.pb.dart'
|
||||
show ReplyInfo;
|
||||
import 'package:PiliPlus/http/video.dart';
|
||||
import 'package:PiliPlus/main.dart';
|
||||
import 'package:PiliPlus/models/common/publish_panel_type.dart';
|
||||
import 'package:PiliPlus/models/common/reply/reply_type.dart';
|
||||
import 'package:PiliPlus/pages/common/common_publish_page.dart';
|
||||
import 'package:PiliPlus/pages/emote/view.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart';
|
||||
@@ -13,11 +14,11 @@ import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class ReplyPage extends CommonPublishPage {
|
||||
final int? oid;
|
||||
final int? root;
|
||||
final int? parent;
|
||||
final ReplyType? replyType;
|
||||
final dynamic replyItem;
|
||||
final int oid;
|
||||
final int root;
|
||||
final int parent;
|
||||
final int replyType;
|
||||
final ReplyInfo? replyItem;
|
||||
final String? hint;
|
||||
|
||||
const ReplyPage({
|
||||
@@ -25,10 +26,10 @@ class ReplyPage extends CommonPublishPage {
|
||||
super.initialValue,
|
||||
super.imageLengthLimit,
|
||||
super.onSave,
|
||||
this.oid,
|
||||
this.root,
|
||||
this.parent,
|
||||
this.replyType,
|
||||
required this.oid,
|
||||
required this.root,
|
||||
required this.parent,
|
||||
required this.replyType,
|
||||
this.replyItem,
|
||||
this.hint,
|
||||
});
|
||||
@@ -243,12 +244,12 @@ class _ReplyPageState extends CommonPublishPageState<ReplyPage> {
|
||||
Future<void> onCustomPublish(
|
||||
{required String message, List? pictures}) async {
|
||||
var result = await VideoHttp.replyAdd(
|
||||
type: widget.replyType ?? ReplyType.video,
|
||||
oid: widget.oid!,
|
||||
root: widget.root!,
|
||||
parent: widget.parent!,
|
||||
message: widget.replyItem != null && widget.replyItem.root != 0
|
||||
? ' 回复 @${widget.replyItem.member.name} : $message'
|
||||
type: widget.replyType,
|
||||
oid: widget.oid,
|
||||
root: widget.root,
|
||||
parent: widget.parent,
|
||||
message: widget.replyItem != null && widget.replyItem!.root != 0
|
||||
? ' 回复 @${widget.replyItem!.member.name} : $message'
|
||||
: message,
|
||||
pictures: pictures,
|
||||
syncToDynamic: _syncToDynamic.value,
|
||||
|
||||
@@ -2,7 +2,6 @@ import 'package:PiliPlus/grpc/bilibili/main/community/reply/v1.pb.dart'
|
||||
show ReplyInfo, DetailListReply, Mode;
|
||||
import 'package:PiliPlus/grpc/reply.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/models/common/reply/reply_type.dart';
|
||||
import 'package:PiliPlus/pages/common/reply_controller.dart';
|
||||
import 'package:PiliPlus/utils/id_utils.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart';
|
||||
@@ -30,7 +29,7 @@ class VideoReplyReplyController extends ReplyController
|
||||
int oid;
|
||||
// rpid 请求楼中楼回复
|
||||
int rpid;
|
||||
ReplyType replyType; // = ReplyType.video;
|
||||
int replyType; // = ReplyType.video;
|
||||
|
||||
ReplyInfo? firstFloor;
|
||||
|
||||
@@ -40,8 +39,7 @@ class VideoReplyReplyController extends ReplyController
|
||||
late final horizontalPreview = GStorage.horizontalPreview;
|
||||
|
||||
@override
|
||||
dynamic get sourceId =>
|
||||
replyType == ReplyType.video ? IdUtils.av2bv(oid) : oid;
|
||||
dynamic get sourceId => replyType == 1 ? IdUtils.av2bv(oid) : oid;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
@@ -108,7 +106,7 @@ class VideoReplyReplyController extends ReplyController
|
||||
@override
|
||||
Future<LoadingState> customGetData() => isDialogue
|
||||
? ReplyGrpc.dialogList(
|
||||
type: replyType.index,
|
||||
type: replyType,
|
||||
oid: oid,
|
||||
root: rpid,
|
||||
dialog: dialog!,
|
||||
@@ -116,7 +114,7 @@ class VideoReplyReplyController extends ReplyController
|
||||
antiGoodsReply: antiGoodsReply,
|
||||
)
|
||||
: ReplyGrpc.detailList(
|
||||
type: replyType.index,
|
||||
type: replyType,
|
||||
oid: oid,
|
||||
root: rpid,
|
||||
rpid: id ?? 0,
|
||||
|
||||
@@ -4,7 +4,6 @@ import 'package:PiliPlus/common/widgets/refresh_indicator.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/models/common/reply/reply_type.dart';
|
||||
import 'package:PiliPlus/pages/common/common_slide_page.dart';
|
||||
import 'package:PiliPlus/pages/video/reply/widgets/reply_item_grpc.dart';
|
||||
import 'package:PiliPlus/pages/video/reply_new/view.dart';
|
||||
@@ -39,7 +38,7 @@ class VideoReplyReplyPanel extends CommonSlidePage {
|
||||
final int? dialog;
|
||||
final ReplyInfo? firstFloor;
|
||||
final String? source;
|
||||
final ReplyType replyType;
|
||||
final int replyType;
|
||||
final bool isDialogue;
|
||||
final VoidCallback? onViewImage;
|
||||
final ValueChanged<int>? onDismissed;
|
||||
@@ -194,7 +193,7 @@ class _VideoReplyReplyPanelState
|
||||
_videoReplyReplyController.onToggleTop(
|
||||
index,
|
||||
_videoReplyReplyController.oid,
|
||||
_videoReplyReplyController.replyType.index,
|
||||
_videoReplyReplyController.replyType,
|
||||
isUpTop,
|
||||
rpid,
|
||||
),
|
||||
@@ -457,7 +456,7 @@ class _VideoReplyReplyPanelState
|
||||
onToggleTop: (isUpTop, rpid) => _videoReplyReplyController.onToggleTop(
|
||||
index,
|
||||
_videoReplyReplyController.oid,
|
||||
_videoReplyReplyController.replyType.index,
|
||||
_videoReplyReplyController.replyType,
|
||||
isUpTop,
|
||||
rpid,
|
||||
),
|
||||
|
||||
@@ -12,7 +12,6 @@ import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/main.dart';
|
||||
import 'package:PiliPlus/models/bangumi/info.dart' as bangumi;
|
||||
import 'package:PiliPlus/models/common/episode_panel_type.dart';
|
||||
import 'package:PiliPlus/models/common/reply/reply_type.dart';
|
||||
import 'package:PiliPlus/models/common/search_type.dart';
|
||||
import 'package:PiliPlus/models/video_detail_res.dart' as video;
|
||||
import 'package:PiliPlus/pages/danmaku/view.dart';
|
||||
@@ -2060,7 +2059,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
oid: oid,
|
||||
rpid: rpid,
|
||||
firstFloor: replyItem,
|
||||
replyType: ReplyType.video,
|
||||
replyType: 1,
|
||||
source: 'videoDetail',
|
||||
onViewImage: videoDetailController.onViewImage,
|
||||
onDismissed: videoDetailController.onDismissed,
|
||||
|
||||
Reference in New Issue
Block a user