mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-14 21:24:02 +08:00
@@ -17,11 +17,10 @@ class PlDanmakuController {
|
||||
this._cid,
|
||||
this._plPlayerController,
|
||||
this._isFileSource,
|
||||
) : _mergeDanmaku = _plPlayerController.mergeDanmaku;
|
||||
);
|
||||
|
||||
final int _cid;
|
||||
final PlPlayerController _plPlayerController;
|
||||
final bool _mergeDanmaku;
|
||||
final bool _isFileSource;
|
||||
|
||||
late final _isLogin = Accounts.main.isLogin;
|
||||
@@ -66,7 +65,6 @@ class PlDanmakuController {
|
||||
|
||||
void handleDanmaku(List<DanmakuElem> elems) {
|
||||
if (elems.isEmpty) return;
|
||||
final uniques = HashMap<String, DanmakuElem>();
|
||||
|
||||
final filters = _plPlayerController.filters;
|
||||
final danmakuWeight = DanmakuOptions.danmakuWeight;
|
||||
@@ -77,16 +75,6 @@ class PlDanmakuController {
|
||||
}
|
||||
|
||||
if (!element.isSelf) {
|
||||
if (_mergeDanmaku) {
|
||||
final elem = uniques[element.content];
|
||||
if (elem == null) {
|
||||
uniques[element.content] = element..count = 1;
|
||||
} else {
|
||||
elem.count++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (element.weight < danmakuWeight ||
|
||||
(shouldFilter && filters.remove(element))) {
|
||||
continue;
|
||||
|
||||
@@ -138,9 +138,7 @@ class _PlDanmakuState extends State<PlDanmaku> {
|
||||
? Colors.white
|
||||
: DmUtils.decimalToColor(e.color),
|
||||
type: DmUtils.getPosition(e.mode),
|
||||
isColorful:
|
||||
playerController.showVipDanmaku &&
|
||||
e.colorful == DmColorfulType.VipGradualColor,
|
||||
isColorful: e.colorful == DmColorfulType.VipGradualColor,
|
||||
count: e.count > 1 ? e.count : null,
|
||||
selfSend: e.isSelf,
|
||||
extra: VideoDanmaku(
|
||||
|
||||
Reference in New Issue
Block a user