renderDmChatTile method

dynamic renderDmChatTile(
  1. dynamic context,
  2. dynamic ref
)

Implementation

ListTile renderDmChatTile(BuildContext context, WidgetRef ref) {
  final profile =
      ref.watch(invitationUserProfileProvider(invitation)).valueOrNull;
  final senderId = invitation.senderIdStr();
  final roomId = invitation.roomIdStr();
  return ListTile(
    leading: ActerAvatar(
      options: AvatarOptions.DM(
        AvatarInfo(
          uniqueId: roomId,
          displayName: profile?.displayName,
          avatar: profile?.avatar,
        ),
        size: 48,
      ),
    ),
    title: (profile?.displayName) != null
        ? Text('${profile?.displayName} ($senderId)')
        : Text(senderId),
    subtitle: Text(L10n.of(context).invitationToDM),
  );
}