mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
31 lines
911 B
Dart
31 lines
911 B
Dart
import 'package:PiliPlus/grpc/bilibili/main/community/reply/v1.pb.dart';
|
|
import 'package:PiliPlus/grpc/reply.dart';
|
|
import 'package:PiliPlus/http/loading_state.dart';
|
|
import 'package:PiliPlus/pages/common/reply_controller.dart';
|
|
import 'package:PiliPlus/utils/storage_pref.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
abstract class CommonDynController extends ReplyController<MainListReply> {
|
|
int get oid;
|
|
int get replyType;
|
|
|
|
late final RxBool showTitle = false.obs;
|
|
|
|
late final horizontalPreview = Pref.horizontalPreview;
|
|
late final List<double> ratio = Pref.dynamicDetailRatio;
|
|
|
|
@override
|
|
Future<LoadingState<MainListReply>> customGetData() => ReplyGrpc.mainList(
|
|
type: replyType,
|
|
oid: oid,
|
|
mode: mode.value,
|
|
cursorNext: cursorNext,
|
|
offset: paginationReply?.nextOffset,
|
|
);
|
|
|
|
@override
|
|
List<ReplyInfo>? getDataList(MainListReply response) {
|
|
return response.replies;
|
|
}
|
|
}
|