mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-12 13:51:38 +08:00
@@ -20,7 +20,7 @@ abstract class CommonDynController extends ReplyController<MainListReply> {
|
||||
Future<LoadingState<MainListReply>> customGetData() => ReplyGrpc.mainList(
|
||||
type: replyType,
|
||||
oid: oid,
|
||||
mode: mode.value,
|
||||
mode: mode,
|
||||
cursorNext: cursorNext,
|
||||
offset: paginationReply?.nextOffset,
|
||||
);
|
||||
|
||||
@@ -20,7 +20,7 @@ abstract class ReplyController<R> extends CommonListController<R, ReplyInfo> {
|
||||
final RxInt count = (-1).obs;
|
||||
|
||||
late final Rx<ReplySortType> sortType;
|
||||
late final Rx<Mode> mode;
|
||||
late Mode mode;
|
||||
|
||||
final savedReplies = <Object, List<RichTextItem>?>{};
|
||||
|
||||
@@ -45,8 +45,7 @@ abstract class ReplyController<R> extends CommonListController<R, ReplyInfo> {
|
||||
super.onInit();
|
||||
final cacheSortType = Pref.replySortType;
|
||||
sortType = cacheSortType.obs;
|
||||
mode =
|
||||
(cacheSortType == .time ? Mode.MAIN_LIST_TIME : Mode.MAIN_LIST_HOT).obs;
|
||||
mode = cacheSortType == .time ? Mode.MAIN_LIST_TIME : Mode.MAIN_LIST_HOT;
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -92,11 +91,11 @@ abstract class ReplyController<R> extends CommonListController<R, ReplyInfo> {
|
||||
switch (sortType.value) {
|
||||
case ReplySortType.time:
|
||||
sortType.value = ReplySortType.hot;
|
||||
mode.value = Mode.MAIN_LIST_HOT;
|
||||
mode = Mode.MAIN_LIST_HOT;
|
||||
break;
|
||||
case ReplySortType.hot:
|
||||
sortType.value = ReplySortType.time;
|
||||
mode.value = Mode.MAIN_LIST_TIME;
|
||||
mode = Mode.MAIN_LIST_TIME;
|
||||
break;
|
||||
case ReplySortType.select:
|
||||
return;
|
||||
|
||||
@@ -16,13 +16,24 @@ class FavSearchController
|
||||
CommonMultiSelectMixin<FavDetailItemModel>,
|
||||
DeleteItemMixin,
|
||||
BaseFavController {
|
||||
int type = Get.arguments['type'];
|
||||
late int type;
|
||||
@override
|
||||
int mediaId = Get.arguments['mediaId'];
|
||||
late int mediaId;
|
||||
@override
|
||||
bool isOwner = Get.arguments['isOwner'];
|
||||
dynamic count = Get.arguments['count'];
|
||||
dynamic title = Get.arguments['title'];
|
||||
late bool isOwner;
|
||||
late dynamic count;
|
||||
late dynamic title;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
final args = Get.arguments;
|
||||
type = args['type'];
|
||||
mediaId = args['mediaId'];
|
||||
isOwner = args['isOwner'];
|
||||
count = args['count'];
|
||||
title = args['title'];
|
||||
super.onInit();
|
||||
}
|
||||
|
||||
final Rx<FavOrderType> order = FavOrderType.mtime.obs;
|
||||
|
||||
|
||||
@@ -13,8 +13,16 @@ class LaterSearchController
|
||||
CommonMultiSelectMixin<LaterItemModel>,
|
||||
DeleteItemMixin,
|
||||
BaseLaterController {
|
||||
dynamic mid = Get.arguments['mid'];
|
||||
dynamic count = Get.arguments['count'];
|
||||
dynamic mid;
|
||||
dynamic count;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
final args = Get.arguments;
|
||||
mid = args['mid'];
|
||||
count = args['count'];
|
||||
super.onInit();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<LoadingState<LaterData>> customGetData() => UserHttp.seeYouLater(
|
||||
|
||||
@@ -26,7 +26,7 @@ class MainReplyController extends ReplyController<MainListReply> {
|
||||
Future<LoadingState<MainListReply>> customGetData() => ReplyGrpc.mainList(
|
||||
type: replyType,
|
||||
oid: oid,
|
||||
mode: mode.value,
|
||||
mode: mode,
|
||||
cursorNext: cursorNext,
|
||||
offset: paginationReply?.nextOffset,
|
||||
);
|
||||
|
||||
@@ -70,7 +70,7 @@ class MineController extends CommonDataController<FavFolderData, FavFolderData>
|
||||
},
|
||||
),
|
||||
(
|
||||
size: 22,
|
||||
size: 21,
|
||||
icon: Icons.watch_later_outlined,
|
||||
title: '稍后再看',
|
||||
onTap: () {
|
||||
|
||||
@@ -288,11 +288,11 @@ class VideoDetailController extends GetxController
|
||||
.toPrecision(2);
|
||||
double minVideoHeightPrecise = minVideoHeight.toPrecision(2);
|
||||
if (currentHeight == minVideoHeightPrecise) {
|
||||
this.videoHeight = minVideoHeight;
|
||||
if (_needAnimOnDimensionChanged(isVertical)) {
|
||||
isExpanding = true;
|
||||
this.videoHeight = minVideoHeight;
|
||||
animationController.forward(from: 1);
|
||||
}
|
||||
animationController.forward(from: 1);
|
||||
} else if (currentHeight < minVideoHeightPrecise) {
|
||||
// expand
|
||||
if (_needAnimOnDimensionChanged(isVertical)) {
|
||||
|
||||
@@ -147,17 +147,17 @@ class _IntroDetailState extends State<PgcIntroPanel>
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Row(
|
||||
spacing: 6,
|
||||
children: [
|
||||
Text(
|
||||
widget.item.areas!.first.name!,
|
||||
style: smallTitle,
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
if (widget.item.areas?.isNotEmpty ?? false)
|
||||
Text(
|
||||
widget.item.areas!.first.name!,
|
||||
style: smallTitle,
|
||||
),
|
||||
Text(
|
||||
widget.item.publish!.pubTimeShow!,
|
||||
style: smallTitle,
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
Text(
|
||||
widget.item.newEp!.desc!,
|
||||
style: smallTitle,
|
||||
|
||||
@@ -105,8 +105,8 @@ class _PayCoinsPageState extends State<PayCoinsPage>
|
||||
return index == 0 ? Assets.mario : Assets.gunSister;
|
||||
}
|
||||
|
||||
late final color = Colors.black.withValues(alpha: 0.4);
|
||||
Color _getPayFilter(int index) => _canPay(index) ? Colors.transparent : color;
|
||||
Color _getPayFilter(int index) =>
|
||||
_canPay(index) ? Colors.transparent : const Color(0x66000000);
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
||||
@@ -33,7 +33,7 @@ class VideoReplyController extends ReplyController<MainListReply> {
|
||||
Future<LoadingState<MainListReply>> customGetData() => ReplyGrpc.mainList(
|
||||
oid: isPugv ? videoCtr.epId! : aid,
|
||||
type: videoType.replyType,
|
||||
mode: mode.value,
|
||||
mode: mode,
|
||||
cursorNext: cursorNext,
|
||||
offset: paginationReply?.nextOffset,
|
||||
);
|
||||
|
||||
@@ -53,7 +53,7 @@ class VideoReplyReplyController extends ReplyController
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
mode.value = Mode.MAIN_LIST_TIME;
|
||||
mode = Mode.MAIN_LIST_TIME;
|
||||
queryData();
|
||||
}
|
||||
|
||||
@@ -132,19 +132,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) {
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'package:PiliPlus/common/widgets/loading_widget/http_error.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';
|
||||
@@ -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,
|
||||
|
||||
@@ -200,6 +200,11 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
}
|
||||
|
||||
Future<void>? playCallBack() {
|
||||
if (!isShowing) {
|
||||
plPlayerController
|
||||
?..addStatusLister(playerListener)
|
||||
..addPositionListener(positionListener);
|
||||
}
|
||||
return plPlayerController?.play();
|
||||
}
|
||||
|
||||
|
||||
@@ -670,7 +670,7 @@ class HeaderControlState extends State<HeaderControl>
|
||||
try {
|
||||
final result = await FilePicker.pickFiles(
|
||||
type: .custom,
|
||||
allowedExtensions: const ['json', 'vtt', 'srt'],
|
||||
allowedExtensions: const ['json', 'vtt', 'srt', 'ass'],
|
||||
);
|
||||
if (result != null) {
|
||||
final file = result.files.single;
|
||||
|
||||
@@ -19,11 +19,11 @@ import 'package:get/get.dart';
|
||||
class WhisperDetailController extends CommonListController<RspSessionMsg, Msg> {
|
||||
late final account = Accounts.main;
|
||||
|
||||
final int talkerId = Get.arguments['talkerId'];
|
||||
final String name = Get.arguments['name'];
|
||||
final String face = Get.arguments['face'];
|
||||
final int? mid = Get.arguments['mid'];
|
||||
final bool isLive = Get.arguments['isLive'] ?? false;
|
||||
late final int talkerId;
|
||||
late final String name;
|
||||
late final String face;
|
||||
late final int? mid;
|
||||
late final bool isLive;
|
||||
|
||||
Int64? msgSeqno;
|
||||
|
||||
@@ -33,6 +33,12 @@ class WhisperDetailController extends CommonListController<RspSessionMsg, Msg> {
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
final args = Get.arguments;
|
||||
talkerId = args['talkerId'];
|
||||
name = args['name'];
|
||||
face = args['face'];
|
||||
mid = args['mid'];
|
||||
isLive = args['isLive'] ?? false;
|
||||
queryData();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user