mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 20:12:35 +08:00
@@ -518,6 +518,25 @@ class LiveRoomController extends GetxController {
|
||||
}
|
||||
addDm(item);
|
||||
break;
|
||||
case 'SUPER_CHAT_MESSAGE_DELETE' when showSuperChat:
|
||||
if (obj['roomid'] == roomId) {
|
||||
final ids = obj['data']?['ids'] as List?;
|
||||
if (ids != null && ids.isNotEmpty) {
|
||||
if (superChatType == .valid) {
|
||||
superChatMsg.removeWhere((e) => ids.contains(e.id));
|
||||
} else {
|
||||
bool? refresh;
|
||||
for (final id in ids) {
|
||||
final item = superChatMsg.firstWhereOrNull((e) => e.id == id);
|
||||
item?.deleted = true;
|
||||
refresh ??= true;
|
||||
}
|
||||
if (refresh ?? false) {
|
||||
superChatMsg.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
case 'WATCHED_CHANGE':
|
||||
watchedShow.value = obj['data']['text_large'];
|
||||
break;
|
||||
|
||||
@@ -141,9 +141,7 @@ class _SuperChatCardState extends State<SuperChatCard> {
|
||||
onSecondaryTapUp: PlatformUtils.isDesktop ? showMenu : null,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
top: Radius.circular(8),
|
||||
),
|
||||
borderRadius: const .vertical(top: .circular(8)),
|
||||
color: Utils.parseColor(item.backgroundColor),
|
||||
border: Border(top: border, left: border, right: border),
|
||||
),
|
||||
@@ -193,16 +191,22 @@ class _SuperChatCardState extends State<SuperChatCard> {
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
bottom: Radius.circular(8),
|
||||
),
|
||||
borderRadius: const .vertical(bottom: .circular(8)),
|
||||
color: bottomColor,
|
||||
),
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: SelectionArea(
|
||||
child: Text(
|
||||
item.message,
|
||||
style: TextStyle(color: Utils.parseColor(item.messageFontColor)),
|
||||
style: TextStyle(
|
||||
color: Utils.parseColor(item.messageFontColor),
|
||||
decoration: !widget.persistentSC && item.deleted
|
||||
? .lineThrough
|
||||
: null,
|
||||
decorationThickness: 1.5,
|
||||
decorationStyle: .double,
|
||||
decorationColor: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user