mark deleted sc

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-10 11:40:33 +08:00
parent d10c737a38
commit ef975de624
3 changed files with 32 additions and 8 deletions

View File

@@ -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;