Package 

Class MessagesViewModelFactory

    • Constructor Summary

      Constructors 
      Constructor Description
      MessagesViewModelFactory(Context context, String channelId, String messageId, String parentMessageId, Boolean autoTranslationEnabled, ChatClient chatClient, ClientState clientState, StreamMediaRecorder mediaRecorder, UserLookupHandler userLookupHandler, Function1<File, String> fileToUriConverter, Integer messageLimit, ClipboardHandler clipboardHandler, Boolean enforceUniqueReactions, Integer maxAttachmentCount, Boolean showSystemMessages, DeletedMessageVisibility deletedMessageVisibility, MessageFooterVisibility messageFooterVisibility, DateSeparatorHandler dateSeparatorHandler, DateSeparatorHandler threadDateSeparatorHandler, MessagePositionHandler messagePositionHandler, Boolean showDateSeparatorInEmptyThread, Boolean showThreadSeparatorInEmptyThread, Boolean threadLoadOlderToNewer, Boolean isComposerLinkPreviewEnabled, Boolean isComposerDraftMessageEnabled)
    • Method Summary

      Modifier and Type Method Description
      <T extends ViewModel> T create(Class<T> modelClass) Creates the required ViewModel for our use case, based on the factories we provided.
      <T extends ViewModel> T create(Class<T> modelClass, CreationExtras extras) Creates the required ViewModel with access to CreationExtras, which provides a SavedStateHandle for persisting state across process death.
      • Methods inherited from class io.getstream.chat.android.compose.viewmodel.messages.MessagesViewModelFactory

        create
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MessagesViewModelFactory

        MessagesViewModelFactory(Context context, String channelId, String messageId, String parentMessageId, Boolean autoTranslationEnabled, ChatClient chatClient, ClientState clientState, StreamMediaRecorder mediaRecorder, UserLookupHandler userLookupHandler, Function1<File, String> fileToUriConverter, Integer messageLimit, ClipboardHandler clipboardHandler, Boolean enforceUniqueReactions, Integer maxAttachmentCount, Boolean showSystemMessages, DeletedMessageVisibility deletedMessageVisibility, MessageFooterVisibility messageFooterVisibility, DateSeparatorHandler dateSeparatorHandler, DateSeparatorHandler threadDateSeparatorHandler, MessagePositionHandler messagePositionHandler, Boolean showDateSeparatorInEmptyThread, Boolean showThreadSeparatorInEmptyThread, Boolean threadLoadOlderToNewer, Boolean isComposerLinkPreviewEnabled, Boolean isComposerDraftMessageEnabled)
        Parameters:
        context - Used to build the ClipboardManager.
        channelId - The current channel ID, to load the messages from.
        messageId - The message id to which we want to scroll to when opening the message list.
        parentMessageId - The ID of the parent Message if the message we want to scroll to is in a thread.
        chatClient - The client to use for API calls.
        clientState - The current state of the SDK.
        mediaRecorder - The media recorder for async voice messages.
        messageLimit - The number of messages to load in a single page.
        clipboardHandler - ClipboardHandler used to copy messages.
        enforceUniqueReactions - Flag to enforce unique reactions or enable multiple from the same user.
        maxAttachmentCount - The maximum number of attachments that can be sent in a single message.
        showSystemMessages - If we should show system message items in the list.
        deletedMessageVisibility - The behavior of deleted messages in the list and if they're visible or not.
        messageFooterVisibility - The behavior of message footers in the list and their visibility.
        dateSeparatorHandler - Handler that determines when the date separators should be visible.
        threadDateSeparatorHandler - Handler that determines when the thread date separators should be visible.
        messagePositionHandler - Determines the position of the message inside a group.
        showDateSeparatorInEmptyThread - Configures if we show a date separator when threads are empty.
        showThreadSeparatorInEmptyThread - Configures if we show a thread separator when threads are empty.
        threadLoadOlderToNewer - Configures if the thread should load older messages to newer messages.
        isComposerLinkPreviewEnabled - If the link preview is enabled in the composer.
        isComposerDraftMessageEnabled - If the draft message is enabled in the composer.