mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 04:00:28 +08:00
export settings file
Closes #950 tweak Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user