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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user