Package-level declarations

Types

Link copied to clipboard
class AttachmentsPickerViewModel @JvmOverloads constructor(storageHelper: AttachmentStorageHelper, channelState: StateFlow<ChannelState?>, savedStateHandle: SavedStateHandle = SavedStateHandle()) : ViewModel

ViewModel for the attachment picker. Drives picker tab state, device storage browsing, and the isSelected checkmarks shown in attachments.

Link copied to clipboard

ViewModel class for the AudioPlayer.

Link copied to clipboard
class AudioPlayerViewModelFactory(getAudioPlayer: () -> AudioPlayer, getRecordingUri: (Attachment) -> String?) : ViewModelProvider.Factory
Link copied to clipboard
class ChannelViewModelFactory(context: Context, channelId: String, messageId: String? = null, parentMessageId: String? = null, autoTranslationEnabled: Boolean = true, chatClient: ChatClient = ChatClient.instance(), clientState: ClientState = chatClient.clientState, mediaRecorder: StreamMediaRecorder = DefaultStreamMediaRecorder(context.applicationContext), userLookupHandler: UserLookupHandler = DefaultUserLookupHandler(chatClient, channelId), fileToUriConverter: (File) -> String = { file -> file.toUri().toString() }, clipboardHandler: ClipboardHandler = ClipboardHandlerImpl( clipboardManager = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager, autoTranslationEnabled = autoTranslationEnabled, getCurrentUser = chatClient::getCurrentUser, ), messageListOptions: MessageListOptions = MessageListOptions(), composerOptions: ComposerOptions = ComposerOptions()) : ViewModelProvider.Factory

Holds all the dependencies needed to build the ViewModels for the Messages Screen. Currently, builds the MessageComposerViewModel, MessageListViewModel and AttachmentsPickerViewModel.

Link copied to clipboard
data class ComposerOptions(val maxAttachmentCount: Int = AttachmentConstants.MAX_ATTACHMENTS_COUNT, val linkPreviewEnabled: Boolean = false, val draftMessagesEnabled: Boolean = true)

Configuration for the message composer behavior.

Link copied to clipboard
class MessageComposerViewModel(messageComposerController: MessageComposerController, storageHelper: AttachmentStorageHelper) : ViewModel

ViewModel responsible for handling the composing and sending of messages.

Link copied to clipboard
data class MessageListOptions(val messageLimit: Int = MessageListController.DEFAULT_MESSAGES_LIMIT, val showSystemMessages: Boolean = true, val messageFooterVisibility: MessageFooterVisibility = MessageFooterVisibility.LastInGroup, val enforceUniqueReactions: Boolean = false, val dateSeparatorHandler: DateSeparatorHandler = DateSeparatorHandler.getDefaultDateSeparatorHandler(), val threadDateSeparatorHandler: DateSeparatorHandler = DateSeparatorHandler.getDefaultThreadDateSeparatorHandler(), val messagePositionHandler: MessagePositionHandler = MessagePositionHandler.defaultHandler(), val showDateSeparatorInEmptyThread: Boolean = false, val showThreadSeparatorInEmptyThread: Boolean = false, val threadLoadOlderToNewer: Boolean = false)

Configuration for the message list behavior.

Link copied to clipboard
class MessageListViewModel(messageListController: MessageListController) : ViewModel

ViewModel responsible for handling all the business logic & state for the list of messages.

Link copied to clipboard
class PollResultsViewModel(poll: Poll, controllerProvider: ViewModel.() -> PollResultsViewController = { PollResultsViewController( poll = poll, ) }) : ViewModel

ViewModel for managing poll results state in Compose UI components.

Link copied to clipboard
data class SubmittedAttachments(val attachments: List<Attachment>, val hasUnsupportedFiles: Boolean)

Event emitted when system picker URIs have been resolved into Attachments.