Skip to content

Commit 609ed13

Browse files
Update message_list.dart
Add avatars to DM recipient headers. Display user avatars alongside names in DM recipient headers, making conversations more visually identifiable. This matches the RN app's behavior The changes: - Add Avatar widgets in DM recipient headers - Maintain consistent sizing and spacing (35px size, 8px right padding) - Handle overflow gracefully for both avatars and names Fixes zulip#41
1 parent 347e19e commit 609ed13

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

lib/widgets/message_list.dart

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,23 @@ class MessageListAppBarTitle extends StatelessWidget {
362362
return const Text("DMs with yourself");
363363
} else {
364364
final names = otherRecipientIds.map((id) => store.users[id]?.fullName ?? '(unknown user)');
365-
return Text("DMs with ${names.join(", ")}"); // TODO show avatars
365+
return Row(
366+
children: [
367+
...otherRecipientIds.map((id) =>
368+
Padding(
369+
padding: const EdgeInsets.only(right: 8),
370+
child: Avatar(size: 35, borderRadius: 32 / 8, userId: id),
371+
)),
372+
Expanded(
373+
child: Text(
374+
otherRecipientIds
375+
.map((id) => store.users[id]?.fullName ?? '(unknown user)')
376+
.join(", "),
377+
overflow: TextOverflow.ellipsis,
378+
),
379+
)
380+
]
381+
);
366382
}
367383
}
368384
}

0 commit comments

Comments
 (0)