ChannelAvatar

fun ChannelAvatar(channel: Channel, currentUser: User?, modifier: Modifier = Modifier, indicator: AvatarPresenceIndicator = AvatarPresenceIndicator.None, showBorder: Boolean = false)

The default avatar for a channel.

This component displays the channel image, the user avatar for direct messages, or a placeholder.

Parameters

channel

The channel whose avatar will be displayed.

currentUser

The user currently logged in.

modifier

The modifier to be applied to this layout.

indicator

The presence indicator to overlay on the avatar. Defaults to AvatarPresenceIndicator.None.

showBorder

Whether to draw a border around the avatar to provide contrast against the background.


fun ChannelAvatar(channel: Channel, currentUser: User?, modifier: Modifier = Modifier, showIndicator: Boolean, showBorder: Boolean = false)

Deprecated

Use the overload that takes an AvatarPresenceIndicator. showIndicator showed a grey dot when the channel was offline; pass an explicit indicator (AvatarPresenceIndicator.Online, Offline, or None) to control the presence states.

The default avatar for a channel.

Parameters

channel

The channel whose avatar will be displayed.

currentUser

The user currently logged in.

modifier

The modifier to be applied to this layout.

showIndicator

Whether to overlay a status indicator to show whether the user is online for 1:1 channels.

showBorder

Whether to draw a border around the avatar to provide contrast against the background.