mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 20:12:35 +08:00
@@ -1,5 +1,6 @@
|
||||
import 'package:PiliPlus/models/model_owner.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_danmaku/live_emote.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_medal_wall/uinfo_medal.dart';
|
||||
import 'package:PiliPlus/pages/danmaku/danmaku_model.dart';
|
||||
|
||||
class DanmakuMsg {
|
||||
@@ -9,6 +10,7 @@ class DanmakuMsg {
|
||||
final BaseEmote? uemote;
|
||||
final Owner? reply;
|
||||
final LiveDanmaku extra;
|
||||
final UinfoMedal? medalInfo;
|
||||
|
||||
const DanmakuMsg({
|
||||
required this.name,
|
||||
@@ -17,6 +19,7 @@ class DanmakuMsg {
|
||||
this.uemote,
|
||||
this.reply,
|
||||
required this.extra,
|
||||
this.medalInfo,
|
||||
});
|
||||
|
||||
factory DanmakuMsg.fromPrefetch(Map<String, dynamic> obj) {
|
||||
@@ -36,6 +39,7 @@ class DanmakuMsg {
|
||||
);
|
||||
}
|
||||
}
|
||||
final medal = user['medal'];
|
||||
return DanmakuMsg(
|
||||
name: user['base']['name'],
|
||||
text: obj['text'],
|
||||
@@ -51,6 +55,7 @@ class DanmakuMsg {
|
||||
ts: checkInfo['ts'],
|
||||
ct: checkInfo['ct'],
|
||||
),
|
||||
medalInfo: medal == null ? null : UinfoMedal.fromJson(medal),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user