mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: show dm
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -83,9 +83,17 @@ class _PlDanmakuState extends State<PlDanmaku> {
|
|||||||
if (!playerController.isOpenDanmu.value) {
|
if (!playerController.isOpenDanmu.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_controller == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (playerController.showDanmaku.not && widget.isPipMode != true) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int currentPosition = position.inMilliseconds;
|
int currentPosition = position.inMilliseconds;
|
||||||
currentPosition -= currentPosition % 100; //取整百的毫秒数
|
currentPosition -= currentPosition % 100; //取整百的毫秒数
|
||||||
|
|
||||||
if (currentPosition == latestAddedPosition) {
|
if (currentPosition == latestAddedPosition) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -93,12 +101,7 @@ class _PlDanmakuState extends State<PlDanmaku> {
|
|||||||
|
|
||||||
List<DanmakuElem>? currentDanmakuList =
|
List<DanmakuElem>? currentDanmakuList =
|
||||||
_plDanmakuController.getCurrentDanmaku(currentPosition);
|
_plDanmakuController.getCurrentDanmaku(currentPosition);
|
||||||
|
if (currentDanmakuList != null) {
|
||||||
if ((widget.isPipMode == true || playerController.showDanmaku) &&
|
|
||||||
_controller != null &&
|
|
||||||
playerController.playerStatus.status.value == PlayerStatus.playing &&
|
|
||||||
playerController.isBuffering.value.not &&
|
|
||||||
currentDanmakuList != null) {
|
|
||||||
for (DanmakuElem e in currentDanmakuList) {
|
for (DanmakuElem e in currentDanmakuList) {
|
||||||
_controller!.addDanmaku(
|
_controller!.addDanmaku(
|
||||||
DanmakuContentItem(
|
DanmakuContentItem(
|
||||||
|
|||||||
Reference in New Issue
Block a user