separate live dm

Closes #1217

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-09-18 16:25:50 +08:00
parent a6182b20c0
commit 64e893e36f
6 changed files with 32 additions and 18 deletions

View File

@@ -75,10 +75,18 @@ class PlayerFocus extends StatelessWidget {
return true;
case LogicalKeyboardKey.keyD:
final newVal = !plPlayerController.enableShowDanmaku.value;
plPlayerController.enableShowDanmaku.value = newVal;
if (!plPlayerController.tempPlayerConf) {
GStorage.setting.put(SettingBoxKey.enableShowDanmaku, newVal);
if (plPlayerController.isLive) {
final newVal = !plPlayerController.enableShowLiveDanmaku.value;
plPlayerController.enableShowLiveDanmaku.value = newVal;
if (!plPlayerController.tempPlayerConf) {
GStorage.setting.put(SettingBoxKey.enableShowLiveDanmaku, newVal);
}
} else {
final newVal = !plPlayerController.enableShowDanmaku.value;
plPlayerController.enableShowDanmaku.value = newVal;
if (!plPlayerController.tempPlayerConf) {
GStorage.setting.put(SettingBoxKey.enableShowDanmaku, newVal);
}
}
return true;