Package-level declarations

Properties

Link copied to clipboard

The fallback preview URL for Giphy attachments when io.getstream.chat.android.ui.common.utils.giphyInfo is not available.

Link copied to clipboard

Retrieves the initials from the channel name.

Returns the initials of the user.

Link copied to clipboard

The image URL to display for link attachment previews.

Link copied to clipboard

The navigation URL for link attachments.

Functions

Link copied to clipboard

Small extension function designed to add a scheme to URLs that do not have one so that they can be opened using android.content.Intent.ACTION_VIEW

Link copied to clipboard

Create the default channel list filter for the given user.

Link copied to clipboard

Generates a displayable name for the attachment. Builds the name using the following priority:

Link copied to clipboard
fun Channel.getDisplayName(context: Context, currentUser: User? = ChatClient.instance().clientState.user.value, @StringRes fallback: Int, maxMembers: Int = 2): String

Returns the channel name if exists, or the list of member names if the channel is distinct.

Link copied to clipboard
fun User.getLastSeenText(context: Context, @StringRes userOnlineResId: Int, @StringRes userLastSeenJustNowResId: Int, @StringRes userLastSeenResId: Int): String

Returns a string describing the elapsed time since the user was online (was watching the channel).

Link copied to clipboard
fun Channel.getMembersStatusText(context: Context, currentUser: User?, countCurrentUserAsOnlineMember: Boolean = true, countOtherUsersAsOnlineMembers: Boolean = true, @StringRes userOnlineResId: Int, @StringRes userLastSeenJustNowResId: Int, @StringRes userLastSeenResId: Int, @PluralsRes memberCountResId: Int, @StringRes memberCountWithOnlineResId: Int): String

Returns a string describing the member status of the channel: either a member count for a group channel or the last seen text for a direct one-to-one conversation with the current user.

Link copied to clipboard
fun Channel.getPreviewMessage(currentUser: User?): Message?

Returns channel's last regular or system message if exists (including pending messages). Deleted and messages from shadow-banned users, are not taken into account.

Link copied to clipboard

Returns the subtitle for the poll based on the maximum number of votes allowed.

Link copied to clipboard

Finds a user in the list by their name or id.

Link copied to clipboard

Checks if the attachment is a link attachment.

Link copied to clipboard

Checks if the attachment is of any file type (file, video, audio or audio recording).

Link copied to clipboard

Checks if the channel is a direct messaging channel.

Link copied to clipboard

Checks if the attachment upload has failed.

Link copied to clipboard
fun Message.isMine(chatClient: ChatClient): Boolean
fun Message.isMine(currentUser: User?): Boolean
Link copied to clipboard
fun Channel.isOneToOne(currentUser: User?): Boolean

Checks if the channel is a direct conversation between the current user and some other user.

Link copied to clipboard

Checks if the attachment is currently being uploaded to the server.

Link copied to clipboard
fun <T> Flow<T>.onFirst(onFirst: (T) -> Unit): Flow<T>

Calls the onFirst lambda when the first element is emitted by the upstream Flow.

Link copied to clipboard

Saves to shared prefs that a permission has been requested.

Link copied to clipboard
fun MessageFooterVisibility.shouldShowMessageFooter(message: Message, isLastMessageInGroup: Boolean, nextMessage: Message?): Boolean

Decides if we need to show the message footer (timestamp) below the message.

Link copied to clipboard