add superChatType

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-12-17 19:54:30 +08:00
parent ce5e85e64b
commit 2e73688688
8 changed files with 60 additions and 26 deletions

View File

@@ -1,3 +1,4 @@
import 'package:PiliPlus/models/common/super_chat_type.dart';
import 'package:PiliPlus/pages/live_room/controller.dart';
import 'package:PiliPlus/pages/live_room/superchat/superchat_card.dart';
import 'package:PiliPlus/pages/search/controller.dart';
@@ -21,6 +22,9 @@ class _SuperChatPanelState extends DebounceStreamState<SuperChatPanel, bool>
@override
Duration get duration => const Duration(milliseconds: 300);
late final persistentSC =
widget.controller.superChatType == SuperChatType.persist;
@override
Widget build(BuildContext context) {
super.build(context);
@@ -42,6 +46,7 @@ class _SuperChatPanelState extends DebounceStreamState<SuperChatPanel, bool>
key: ValueKey(item.id),
item: item,
onRemove: () => ctr?.add(true),
persistentSC: persistentSC,
);
},
separatorBuilder: (_, _) => const SizedBox(height: 12),