mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-23 02:26:52 +08:00
tweak (#1325)
* tweak * opt: async * tweak * opt: PopularSeries tile * tweak * opt: sc * mod: more account type * tweak * opt: qrcode * tweak * partial revert: opt: sc * fix * fix * mod: window enqueue
This commit is contained in:
committed by
GitHub
parent
67c25bd130
commit
4ae3bd2845
@@ -30,10 +30,16 @@ class _SuperChatPanelState extends DebounceStreamState<SuperChatPanel, bool>
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
physics: const ClampingScrollPhysics(),
|
||||
itemCount: widget.controller.superChatMsg.length,
|
||||
findChildIndexCallback: (key) {
|
||||
final index = widget.controller.superChatMsg.indexWhere(
|
||||
(i) => i.id == (key as ValueKey<int>).value,
|
||||
);
|
||||
return index == -1 ? null : index;
|
||||
},
|
||||
itemBuilder: (context, index) {
|
||||
final item = widget.controller.superChatMsg[index];
|
||||
return SuperChatCard(
|
||||
key: Key(item.id.toString()),
|
||||
key: ValueKey(item.id),
|
||||
item: item,
|
||||
onRemove: () => ctr?.add(true),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user