@@ -301,8 +301,6 @@ class _AllDmsSection extends StatelessWidget {
301
301
return _DmItem (
302
302
narrow: narrow,
303
303
count: count,
304
- allDmsCount: data.count,
305
- pageState: pageState,
306
304
);
307
305
}),
308
306
]));
@@ -313,14 +311,10 @@ class _DmItem extends StatelessWidget {
313
311
const _DmItem ({
314
312
required this .narrow,
315
313
required this .count,
316
- required this .allDmsCount,
317
- required this .pageState
318
314
});
319
315
320
316
final DmNarrow narrow;
321
317
final int count;
322
- final int allDmsCount;
323
- final _InboxPageState pageState;
324
318
325
319
@override
326
320
Widget build (BuildContext context) {
@@ -337,39 +331,32 @@ class _DmItem extends StatelessWidget {
337
331
_ => narrow.otherRecipientIds.map ((id) => store.users[id]? .fullName ?? '(unknown user)' ).join (', ' ),
338
332
};
339
333
340
- return StickyHeaderItem (
341
- header: _AllDmsHeaderItem (
342
- count: allDmsCount,
343
- collapsed: false ,
344
- pageState: pageState,
345
- ),
346
- allowOverflow: true ,
347
- child: Material (
348
- color: Colors .white,
349
- child: InkWell (
350
- onTap: () {
351
- Navigator .push (context,
352
- MessageListPage .buildRoute (context: context, narrow: narrow));
353
- },
354
- child: ConstrainedBox (constraints: const BoxConstraints (minHeight: 34 ),
355
- child: Row (crossAxisAlignment: CrossAxisAlignment .center, children: [
356
- const SizedBox (width: 63 ),
357
- Expanded (child: Padding (
358
- padding: const EdgeInsets .symmetric (vertical: 4 ),
359
- child: Text (
360
- style: const TextStyle (
361
- fontSize: 17 ,
362
- height: (20 / 17 ),
363
- color: Color (0xFF222222 ),
364
- ),
365
- maxLines: 2 ,
366
- overflow: TextOverflow .ellipsis,
367
- title))),
368
- const SizedBox (width: 12 ),
369
- Padding (padding: const EdgeInsetsDirectional .only (end: 16 ),
370
- child: UnreadCountBadge (backgroundColor: null ,
371
- count: count)),
372
- ])))));
334
+ return Material (
335
+ color: Colors .white,
336
+ child: InkWell (
337
+ onTap: () {
338
+ Navigator .push (context,
339
+ MessageListPage .buildRoute (context: context, narrow: narrow));
340
+ },
341
+ child: ConstrainedBox (constraints: const BoxConstraints (minHeight: 34 ),
342
+ child: Row (crossAxisAlignment: CrossAxisAlignment .center, children: [
343
+ const SizedBox (width: 63 ),
344
+ Expanded (child: Padding (
345
+ padding: const EdgeInsets .symmetric (vertical: 4 ),
346
+ child: Text (
347
+ style: const TextStyle (
348
+ fontSize: 17 ,
349
+ height: (20 / 17 ),
350
+ color: Color (0xFF222222 ),
351
+ ),
352
+ maxLines: 2 ,
353
+ overflow: TextOverflow .ellipsis,
354
+ title))),
355
+ const SizedBox (width: 12 ),
356
+ Padding (padding: const EdgeInsetsDirectional .only (end: 16 ),
357
+ child: UnreadCountBadge (backgroundColor: null ,
358
+ count: count)),
359
+ ]))));
373
360
}
374
361
}
375
362
@@ -432,8 +419,6 @@ class _StreamSection extends StatelessWidget {
432
419
streamId: data.streamId,
433
420
topic: topic,
434
421
count: count,
435
- streamCount: data.count,
436
- pageState: pageState,
437
422
);
438
423
}),
439
424
]));
@@ -445,56 +430,44 @@ class _TopicItem extends StatelessWidget {
445
430
required this .streamId,
446
431
required this .topic,
447
432
required this .count,
448
- required this .streamCount,
449
- required this .pageState,
450
433
});
451
434
452
435
final int streamId;
453
436
final String topic;
454
437
final int count;
455
- final int streamCount;
456
- final _InboxPageState pageState;
457
438
458
439
@override
459
440
Widget build (BuildContext context) {
460
441
final store = PerAccountStoreWidget .of (context);
461
442
final subscription = store.subscriptions[streamId]! ;
462
443
463
- return StickyHeaderItem (
464
- header: _StreamHeaderItem (
465
- subscription: subscription,
466
- count: streamCount,
467
- collapsed: false ,
468
- pageState: pageState,
469
- ),
470
- allowOverflow: true ,
471
- child: Material (
472
- color: Colors .white,
473
- child: InkWell (
474
- onTap: () {
475
- final narrow = TopicNarrow (streamId, topic);
476
- Navigator .push (context,
477
- MessageListPage .buildRoute (context: context, narrow: narrow));
478
- },
479
- child: ConstrainedBox (constraints: const BoxConstraints (minHeight: 34 ),
480
- child: Row (crossAxisAlignment: CrossAxisAlignment .center, children: [
481
- const SizedBox (width: 63 ),
482
- Expanded (child: Padding (
483
- padding: const EdgeInsets .symmetric (vertical: 4 ),
484
- child: Text (
485
- style: const TextStyle (
486
- fontSize: 17 ,
487
- height: (20 / 17 ),
488
- color: Color (0xFF222222 ),
489
- ),
490
- maxLines: 2 ,
491
- overflow: TextOverflow .ellipsis,
492
- topic))),
493
- const SizedBox (width: 12 ),
494
- // TODO(#384) show @-mention indicator when it applies
495
- Padding (padding: const EdgeInsetsDirectional .only (end: 16 ),
496
- child: UnreadCountBadge (backgroundColor: subscription.colorSwatch (),
497
- count: count)),
498
- ])))));
444
+ return Material (
445
+ color: Colors .white,
446
+ child: InkWell (
447
+ onTap: () {
448
+ final narrow = TopicNarrow (streamId, topic);
449
+ Navigator .push (context,
450
+ MessageListPage .buildRoute (context: context, narrow: narrow));
451
+ },
452
+ child: ConstrainedBox (constraints: const BoxConstraints (minHeight: 34 ),
453
+ child: Row (crossAxisAlignment: CrossAxisAlignment .center, children: [
454
+ const SizedBox (width: 63 ),
455
+ Expanded (child: Padding (
456
+ padding: const EdgeInsets .symmetric (vertical: 4 ),
457
+ child: Text (
458
+ style: const TextStyle (
459
+ fontSize: 17 ,
460
+ height: (20 / 17 ),
461
+ color: Color (0xFF222222 ),
462
+ ),
463
+ maxLines: 2 ,
464
+ overflow: TextOverflow .ellipsis,
465
+ topic))),
466
+ const SizedBox (width: 12 ),
467
+ // TODO(#384) show @-mention indicator when it applies
468
+ Padding (padding: const EdgeInsetsDirectional .only (end: 16 ),
469
+ child: UnreadCountBadge (backgroundColor: subscription.colorSwatch (),
470
+ count: count)),
471
+ ]))));
499
472
}
500
473
}
0 commit comments