mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-25 04:45:54 +08:00
fix: danmaku (#1696)
* fix: post danmaku * mod: tap danmaku * mod: delete danmaku
This commit is contained in:
committed by
GitHub
parent
63030147ea
commit
08944241bb
@@ -1140,8 +1140,10 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
default:
|
||||
if (_suspendedDm == null) {
|
||||
plPlayerController.controls = !plPlayerController.showControls.value;
|
||||
} else {
|
||||
} else if (_suspendedDm!.suspend) {
|
||||
_dmOffset.value = details.localPosition;
|
||||
} else {
|
||||
_suspendedDm = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1153,13 +1155,14 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
final pos = details.localPosition;
|
||||
final item = ctr.findSingleDanmaku(pos);
|
||||
if (item == null) {
|
||||
_removeDmAction();
|
||||
_suspendedDm?.suspend = false;
|
||||
_dmOffset.value = null;
|
||||
} else if (item != _suspendedDm) {
|
||||
_suspendedDm?.suspend = false;
|
||||
if (item.content.extra == null) {
|
||||
_removeDmAction();
|
||||
_dmOffset.value = null;
|
||||
return;
|
||||
}
|
||||
_suspendedDm?.suspend = false;
|
||||
_suspendedDm = item..suspend = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user