File tree Expand file tree Collapse file tree 1 file changed +5
-16
lines changed Expand file tree Collapse file tree 1 file changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -485,33 +485,22 @@ class _StreamSection extends StatelessWidget {
485
485
child: Column (children: [
486
486
header,
487
487
if (! collapsed) ...data.items.map ((item) {
488
- final _StreamSectionTopicData (: topic, : count, : hasMention) = item;
489
- return _TopicItem (
490
- streamId: data.streamId,
491
- topic: topic,
492
- count: count,
493
- hasMention: hasMention,
494
- );
488
+ return _TopicItem (streamId: data.streamId, data: item);
495
489
}),
496
490
]));
497
491
}
498
492
}
499
493
500
494
class _TopicItem extends StatelessWidget {
501
- const _TopicItem ({
502
- required this .streamId,
503
- required this .topic,
504
- required this .count,
505
- required this .hasMention,
506
- });
495
+ const _TopicItem ({required this .streamId, required this .data});
507
496
508
497
final int streamId;
509
- final TopicName topic;
510
- final int count;
511
- final bool hasMention;
498
+ final _StreamSectionTopicData data;
512
499
513
500
@override
514
501
Widget build (BuildContext context) {
502
+ final _StreamSectionTopicData (: topic, : count, : hasMention) = data;
503
+
515
504
final store = PerAccountStoreWidget .of (context);
516
505
final subscription = store.subscriptions[streamId]! ;
517
506
You can’t perform that action at this time.
0 commit comments