export settings file

Closes #950

tweak

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-08-07 20:59:58 +08:00
parent ef1ccabc8a
commit be998b8ee1
11 changed files with 80 additions and 39 deletions

View File

@@ -39,13 +39,12 @@ class LiveRoomController extends GetxController {
Rx<RoomInfoH5Data?> roomInfoH5 = Rx<RoomInfoH5Data?>(null);
Rx<int?> liveTime = Rx<int?>(null);
static const periodMins = 5;
Timer? liveTimeTimer;
void startLiveTimer() {
if (liveTime.value != null) {
liveTimeTimer ??= Timer.periodic(
const Duration(minutes: periodMins),
const Duration(minutes: 5),
(_) => liveTime.refresh(),
);
}

View File

@@ -354,11 +354,11 @@ class _LiveRoomPageState extends State<LiveRoomPage>
if (text.isNotEmpty) {
text += ' ';
}
text +=
'开播${DurationUtil.formatDurationBetween(
liveTime * 1000,
DateTime.now().millisecondsSinceEpoch,
)}';
final duration = DurationUtil.formatDurationBetween(
liveTime * 1000,
DateTime.now().millisecondsSinceEpoch,
);
text += duration.isEmpty ? '刚刚开播' : '开播$duration';
}
if (text.isEmpty) {
return const SizedBox.shrink();
@@ -616,7 +616,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
);
},
transitionDuration: fromEmote
? const Duration(milliseconds: 300)
? const Duration(milliseconds: 400)
: const Duration(milliseconds: 500),
transitionBuilder: (context, animation, secondaryAnimation, child) {
var tween = Tween(
@@ -689,12 +689,8 @@ class _LiveDanmakuState extends State<LiveDanmaku> {
area: plPlayerController.showArea,
opacity: plPlayerController.danmakuOpacity,
hideTop: plPlayerController.blockTypes.contains(5),
hideScroll: plPlayerController.blockTypes.contains(
2,
),
hideBottom: plPlayerController.blockTypes.contains(
4,
),
hideScroll: plPlayerController.blockTypes.contains(2),
hideBottom: plPlayerController.blockTypes.contains(4),
duration:
plPlayerController.danmakuDuration /
plPlayerController.playbackSpeed,

View File

@@ -35,10 +35,7 @@ class BottomControl extends StatelessWidget {
titleSpacing: 14,
title: Row(
children: [
PlayOrPauseButton(
plPlayerController: plPlayerController,
),
const SizedBox(width: 10),
PlayOrPauseButton(plPlayerController: plPlayerController),
ComBtn(
icon: const Icon(
Icons.refresh,