mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
live dm action
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -8,6 +8,7 @@ import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/http/video.dart';
|
||||
import 'package:PiliPlus/models/common/super_chat_type.dart';
|
||||
import 'package:PiliPlus/models/common/video/live_quality.dart';
|
||||
import 'package:PiliPlus/models/model_owner.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_danmaku/danmaku_msg.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_danmaku/live_emote.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_dm_info/data.dart';
|
||||
@@ -441,6 +442,22 @@ class LiveRoomController extends GetxController {
|
||||
if (first[13] case Map<String, dynamic> map) {
|
||||
uemote = BaseEmote.fromJson(map);
|
||||
}
|
||||
final checkInfo = info[9];
|
||||
final liveExtra = LiveDanmaku(
|
||||
id: extra['id_str'],
|
||||
mid: uid,
|
||||
dmType: extra['dm_type'],
|
||||
ts: checkInfo['ts'],
|
||||
ct: checkInfo['ct'],
|
||||
);
|
||||
Owner? reply;
|
||||
final replyMid = extra['reply_mid'];
|
||||
if (replyMid != null && replyMid != 0) {
|
||||
reply = Owner(
|
||||
mid: replyMid,
|
||||
name: extra['reply_uname'],
|
||||
);
|
||||
}
|
||||
messages.add(
|
||||
DanmakuMsg(
|
||||
name: name,
|
||||
@@ -450,11 +467,12 @@ class LiveRoomController extends GetxController {
|
||||
(k, v) => MapEntry(k, BaseEmote.fromJson(v)),
|
||||
),
|
||||
uemote: uemote,
|
||||
extra: liveExtra,
|
||||
reply: reply,
|
||||
),
|
||||
);
|
||||
|
||||
if (plPlayerController.showDanmaku) {
|
||||
final checkInfo = info[9];
|
||||
danmakuController?.addDanmaku(
|
||||
DanmakuContentItem(
|
||||
msg,
|
||||
@@ -464,13 +482,7 @@ class LiveRoomController extends GetxController {
|
||||
type: DmUtils.getPosition(extra['mode']),
|
||||
// extra['send_from_me'] is invalid
|
||||
selfSend: isLogin && uid == mid,
|
||||
extra: LiveDanmaku(
|
||||
id: extra['id_str'],
|
||||
mid: uid,
|
||||
dmType: extra['dm_type'],
|
||||
ts: checkInfo['ts'],
|
||||
ct: checkInfo['ct'],
|
||||
),
|
||||
extra: liveExtra,
|
||||
),
|
||||
);
|
||||
if (!disableAutoScroll.value) {
|
||||
|
||||
Reference in New Issue
Block a user