mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-15 05:33:59 +08:00
@@ -5,7 +5,6 @@ import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/pages/common/publish/publish_route.dart';
|
||||
import 'package:PiliPlus/pages/common/reply_controller.dart';
|
||||
import 'package:PiliPlus/pages/video/reply_new/view.dart';
|
||||
import 'package:PiliPlus/utils/id_utils.dart';
|
||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
import 'package:extended_nested_scroll_view/extended_nested_scroll_view.dart';
|
||||
import 'package:fixnum/fixnum.dart';
|
||||
@@ -47,13 +46,10 @@ class VideoReplyReplyController extends ReplyController
|
||||
|
||||
late final horizontalPreview = Pref.horizontalPreview;
|
||||
|
||||
@override
|
||||
dynamic get sourceId => replyType == 1 ? IdUtils.av2bv(oid) : oid;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
mode.value = Mode.MAIN_LIST_TIME;
|
||||
mode = Mode.MAIN_LIST_TIME;
|
||||
queryData();
|
||||
}
|
||||
|
||||
@@ -132,19 +128,10 @@ class VideoReplyReplyController extends ReplyController
|
||||
oid: oid,
|
||||
root: rpid,
|
||||
rpid: id ?? 0,
|
||||
mode: mode.value,
|
||||
mode: mode,
|
||||
offset: paginationReply?.nextOffset,
|
||||
);
|
||||
|
||||
@override
|
||||
void queryBySort() {
|
||||
if (isLoading) return;
|
||||
mode.value = mode.value == Mode.MAIN_LIST_HOT
|
||||
? Mode.MAIN_LIST_TIME
|
||||
: Mode.MAIN_LIST_HOT;
|
||||
onReload();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> onReload() {
|
||||
if (loadingState.value.isSuccess) {
|
||||
@@ -202,9 +189,7 @@ class VideoReplyReplyController extends ReplyController
|
||||
loadingState
|
||||
..value.dataOrNull?.insert(index! + 1, replyInfo)
|
||||
..refresh();
|
||||
if (enableCommAntifraud) {
|
||||
onCheckReply(replyInfo, isManual: false);
|
||||
}
|
||||
onCheckReply(replyInfo, isManual: false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,10 +3,11 @@ import 'package:PiliPlus/common/style.dart';
|
||||
import 'package:PiliPlus/common/widgets/colored_box_transition.dart';
|
||||
import 'package:PiliPlus/common/widgets/flutter/refresh_indicator.dart';
|
||||
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
||||
import 'package:PiliPlus/common/widgets/scaffold.dart';
|
||||
import 'package:PiliPlus/common/widgets/sliver/sliver_pinned_header.dart';
|
||||
import 'package:PiliPlus/common/widgets/view_safe_area.dart';
|
||||
import 'package:PiliPlus/grpc/bilibili/main/community/reply/v1.pb.dart'
|
||||
show ReplyInfo, Mode;
|
||||
show ReplyInfo;
|
||||
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';
|
||||
@@ -65,8 +66,7 @@ class VideoReplyReplyPanel extends CommonSlidePage {
|
||||
'type': type,
|
||||
'enterUri': ?uri?.toString(), // save panel
|
||||
},
|
||||
() => Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
() => scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('评论详情'),
|
||||
actions: [
|
||||
@@ -272,7 +272,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel>
|
||||
),
|
||||
label: Obx(
|
||||
() => Text(
|
||||
_controller.mode.value == Mode.MAIN_LIST_HOT ? '按热度' : '按时间',
|
||||
_controller.sortType.value.text!,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: theme.colorScheme.secondary,
|
||||
|
||||
Reference in New Issue
Block a user