mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-26 12:07:11 +08:00
separate live dm
Closes #1217 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -775,8 +775,8 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
||||
children: [
|
||||
Obx(
|
||||
() {
|
||||
final enableShowDanmaku =
|
||||
plPlayerController.enableShowDanmaku.value;
|
||||
final enableShowLiveDanmaku =
|
||||
plPlayerController.enableShowLiveDanmaku.value;
|
||||
return SizedBox(
|
||||
width: 34,
|
||||
height: 34,
|
||||
@@ -785,16 +785,17 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
||||
padding: EdgeInsets.zero,
|
||||
),
|
||||
onPressed: () {
|
||||
final newVal = !enableShowDanmaku;
|
||||
plPlayerController.enableShowDanmaku.value = newVal;
|
||||
final newVal = !enableShowLiveDanmaku;
|
||||
plPlayerController.enableShowLiveDanmaku.value =
|
||||
newVal;
|
||||
if (!plPlayerController.tempPlayerConf) {
|
||||
GStorage.setting.put(
|
||||
SettingBoxKey.enableShowDanmaku,
|
||||
SettingBoxKey.enableShowLiveDanmaku,
|
||||
newVal,
|
||||
);
|
||||
}
|
||||
},
|
||||
icon: enableShowDanmaku
|
||||
icon: enableShowLiveDanmaku
|
||||
? const Icon(
|
||||
size: 22,
|
||||
Icons.subtitles_outlined,
|
||||
@@ -1019,7 +1020,7 @@ class _LiveDanmakuState extends State<LiveDanmaku> {
|
||||
return Obx(
|
||||
() {
|
||||
return AnimatedOpacity(
|
||||
opacity: plPlayerController.enableShowDanmaku.value ? 1 : 0,
|
||||
opacity: plPlayerController.enableShowLiveDanmaku.value ? 1 : 0,
|
||||
duration: const Duration(milliseconds: 100),
|
||||
child: DanmakuScreen(
|
||||
createdController: (DanmakuController e) {
|
||||
|
||||
@@ -70,10 +70,10 @@ class BottomControl extends StatelessWidget {
|
||||
const SizedBox(width: 3),
|
||||
Obx(
|
||||
() {
|
||||
final enableShowDanmaku =
|
||||
plPlayerController.enableShowDanmaku.value;
|
||||
final enableShowLiveDanmaku =
|
||||
plPlayerController.enableShowLiveDanmaku.value;
|
||||
return ComBtn(
|
||||
icon: enableShowDanmaku
|
||||
icon: enableShowLiveDanmaku
|
||||
? const Icon(
|
||||
size: 18,
|
||||
Icons.subtitles_outlined,
|
||||
@@ -85,11 +85,11 @@ class BottomControl extends StatelessWidget {
|
||||
color: Colors.white,
|
||||
),
|
||||
onTap: () {
|
||||
final newVal = !enableShowDanmaku;
|
||||
plPlayerController.enableShowDanmaku.value = newVal;
|
||||
final newVal = !enableShowLiveDanmaku;
|
||||
plPlayerController.enableShowLiveDanmaku.value = newVal;
|
||||
if (!plPlayerController.tempPlayerConf) {
|
||||
GStorage.setting.put(
|
||||
SettingBoxKey.enableShowDanmaku,
|
||||
SettingBoxKey.enableShowLiveDanmaku,
|
||||
newVal,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user