mod: 样式修改、历史记录修改

This commit is contained in:
guozhigq
2023-07-10 11:01:22 +08:00
parent 54a5fc61f0
commit f305e0864f
10 changed files with 63 additions and 67 deletions

View File

@ -49,6 +49,8 @@ class VideoDetailController extends GetxController
Timer? timer;
RxString bgCover = ''.obs;
@override
void onInit() {
super.onInit();
@ -58,10 +60,12 @@ class VideoDetailController extends GetxController
var args = Get.arguments['videoItem'];
if (args.pic != null && args.pic != '') {
videoItem['pic'] = args.pic;
bgCover.value = args.pic;
}
}
if (Get.arguments.containsKey('pic')) {
videoItem['pic'] = Get.arguments['pic'];
bgCover.value = Get.arguments['pic'];
}
heroTag = Get.arguments['heroTag'];
}
@ -135,7 +139,11 @@ class VideoDetailController extends GetxController
void markHeartBeat() async {
Duration progress = meeduPlayerController.position.value;
await VideoHttp.heartBeat(bvid: bvid, progress: progress.inSeconds);
await VideoHttp.heartBeat(
bvid: bvid,
cid: cid,
progress: progress.inSeconds,
);
}
@override

View File

@ -78,8 +78,13 @@ Widget seasonPanel(UgcSeason ugcSeason, cid) {
padding: const EdgeInsets.fromLTRB(10, 10, 10, 10),
child: Row(
children: [
Text('合集:${ugcSeason.title!}'),
const Spacer(),
Expanded(
child: Text(
'合集:${ugcSeason.title!}',
overflow: TextOverflow.ellipsis,
),
),
const SizedBox(width: 15),
Text(
'${currentIndex + 1} / ${ugcSeason.epCount}',
style: Theme.of(context).textTheme.labelSmall,

View File

@ -345,10 +345,11 @@ class ReplyItemRow extends StatelessWidget {
child: Container(
width: double.infinity,
padding: EdgeInsets.fromLTRB(
8,
i == 0 && (extraRow == 1 || replies!.length > 1) ? 8 : 5,
8,
5),
8,
i == 0 && (extraRow == 1 || replies!.length > 1) ? 8 : 5,
8,
i == 0 && (extraRow == 1 || replies!.length > 1) ? 5 : 6,
),
child: Text.rich(
overflow: extraRow == 1
? TextOverflow.ellipsis

View File

@ -31,11 +31,6 @@ class _VideoDetailPageState extends State<VideoDetailPage>
final ScrollController _extendNestCtr = ScrollController();
late AnimationController animationController;
// final _meeduPlayerController = MeeduPlayerController(
// pipEnabled: true,
// controlsStyle: ControlsStyle.secondary,
// enabledButtons: const EnabledButtons(pip: true),
// );
StreamSubscription? _playerEventSubs;
bool isPlay = false;
PlayerStatus playerStatus = PlayerStatus.paused;
@ -154,11 +149,13 @@ class _VideoDetailPageState extends State<VideoDetailPage>
top: 0,
left: 0,
right: 0,
child: NetworkImgLayer(
type: 'emote',
src: videoDetailController.videoItem['pic'],
width: Get.size.width,
height: videoHeight + 100,
child: Obx(
() => NetworkImgLayer(
type: 'emote',
src: videoDetailController.bgCover.value,
width: Get.size.width,
height: videoHeight,
),
),
),
Positioned.fill(
@ -226,15 +223,6 @@ class _VideoDetailPageState extends State<VideoDetailPage>
size: 19,
),
),
title: Text(
'视频详情',
style: TextStyle(
color: Colors.white,
fontSize: Theme.of(context)
.textTheme
.titleSmall!
.fontSize),
),
);
},
),
@ -304,14 +292,6 @@ class _VideoDetailPageState extends State<VideoDetailPage>
),
),
),
// 弹幕开关
// const Spacer(),
// Flexible(
// flex: 2,
// child: Container(
// height: 50,
// ),
// ),
],
),
),