mirror of
https://github.com/block/buzz.git
synced 2026-11-13 12:51:34 +00:00
Builds on the merged themes work in #8358 and inherits its appearance and chat-color settings. Polishes mobile conversations with uniform rounded bubbles, desktop-style text-only mentions and agent icon, aligned gallery counts, fading gallery avatars, and standard iOS scrolling. Huddles use rounded cards with attached reaction trays, without duplicate start/end notices; other activity rows stay centered with smaller text. Validation: mobile checks, the full mobile test suite, and the gallery regression test passed. Release build installed on iPhone. Full `just ci` could not finish: desktop compilation exhausted local disk space. ### Snapshots Flutter-rendered light and dark previews using seeded sample messages. | Light | Dark | | --- | --- | |  |  | --------- Signed-off-by: kenny lopez <klopez4212@gmail.com>
23 lines
730 B
Dart
23 lines
730 B
Dart
import 'timeline_message.dart';
|
|
|
|
/// Endings collapse only when a visible start card represents them and no
|
|
/// reactions on the ending need their own interactive surface.
|
|
bool isCollapsedHuddleEnding(
|
|
TimelineMessage message,
|
|
Iterable<TimelineMessage> loaded,
|
|
) {
|
|
final event = message.systemEvent;
|
|
if (event?.type != SystemEventType.huddleEnded ||
|
|
event?.ephemeralChannelId == null ||
|
|
message.reactions.isNotEmpty) {
|
|
return false;
|
|
}
|
|
return loaded.any(
|
|
(start) =>
|
|
start.parentId == null &&
|
|
start.systemEvent?.type == SystemEventType.huddleStarted &&
|
|
start.systemEvent?.ephemeralChannelId == event!.ephemeralChannelId &&
|
|
start.createdAt <= message.createdAt,
|
|
);
|
|
}
|