mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-24 11:06:51 +08:00
check selfdm
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -55,11 +55,12 @@ class PlDanmakuController {
|
||||
if (mergeDanmaku) {
|
||||
final count = counts[element.content];
|
||||
if (count != 1) {
|
||||
element.attr = count!;
|
||||
} else {
|
||||
element.clearAttr();
|
||||
element.count = count!;
|
||||
}
|
||||
}
|
||||
if (plPlayerController.isLogin) {
|
||||
element.isSelf = element.midHash == plPlayerController.midHash;
|
||||
}
|
||||
int pos = element.progress ~/ 100; //每0.1秒存储一次
|
||||
(dmSegMap[pos] ??= []).add(element);
|
||||
}
|
||||
|
||||
@@ -130,9 +130,8 @@ class _PlDanmakuState extends State<PlDanmaku> {
|
||||
e.colorful == DmColorfulType.VipGradualColor
|
||||
? true
|
||||
: null,
|
||||
count: widget.playerController.mergeDanmaku && e.hasAttr()
|
||||
? e.attr
|
||||
: null,
|
||||
count: e.hasCount() ? e.count : null,
|
||||
selfSend: e.isSelf,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -49,13 +49,14 @@ class LiveRoomController extends GetxController {
|
||||
String? savedDanmaku;
|
||||
|
||||
late final isLogin = Accounts.main.isLogin;
|
||||
late final mid = Accounts.main.mid;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
roomId = int.parse(Get.parameters['roomid']!);
|
||||
queryLiveInfoH5();
|
||||
if (Accounts.main.isLogin && !MineController.anonymity.value) {
|
||||
if (isLogin && !MineController.anonymity.value) {
|
||||
VideoHttp.roomEntryAction(roomId: roomId);
|
||||
}
|
||||
}
|
||||
@@ -221,9 +222,10 @@ class LiveRoomController extends GetxController {
|
||||
final content = first[15];
|
||||
final extra = jsonDecode(content['extra']);
|
||||
final user = content['user'];
|
||||
final uid = user['uid'];
|
||||
messages.add({
|
||||
'name': user['base']['name'],
|
||||
'uid': user['uid'],
|
||||
'uid': uid,
|
||||
'text': info[1],
|
||||
'emots': extra['emots'],
|
||||
'uemote': first[13],
|
||||
@@ -234,6 +236,7 @@ class LiveRoomController extends GetxController {
|
||||
extra['content'],
|
||||
color: DmUtils.decimalToColor(extra['color']),
|
||||
type: DmUtils.getPosition(extra['mode']),
|
||||
selfSend: uid == mid,
|
||||
),
|
||||
);
|
||||
WidgetsBinding.instance
|
||||
|
||||
Reference in New Issue
Block a user