Class MessageListViewModelFactory

  • All Implemented Interfaces:
    androidx.lifecycle.ViewModelProvider.Factory

    
    public final class MessageListViewModelFactory
     implements ViewModelProvider.Factory
                        

    A ViewModel factory for MessageListViewModel, MessageListHeaderViewModel and MessageComposerViewModel.

    • Constructor Detail

      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid, String messageId, String parentMessageId, ChatClient chatClient, ClientState clientState, StreamMediaRecorder mediaRecorder, UserLookupHandler userLookupHandler, Function1<File, String> fileToUri, Integer messageLimit, Boolean enforceUniqueReactions, Integer maxAttachmentCount, Boolean showSystemMessages, DeletedMessageVisibility deletedMessageVisibility, MessageFooterVisibility messageFooterVisibility, DateSeparatorHandler dateSeparatorHandler, DateSeparatorHandler threadDateSeparatorHandler, MessagePositionHandler messagePositionHandler, Boolean showDateSeparatorInEmptyThread, Boolean showThreadSeparatorInEmptyThread)
        Parameters:
        cid - 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 limit of the messages to load in a single page.
        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.
      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid, String messageId, String parentMessageId, ChatClient chatClient, ClientState clientState, StreamMediaRecorder mediaRecorder, UserLookupHandler userLookupHandler, Function1<File, String> fileToUri, Integer messageLimit, Boolean enforceUniqueReactions, Integer maxAttachmentCount, Boolean showSystemMessages, DeletedMessageVisibility deletedMessageVisibility, MessageFooterVisibility messageFooterVisibility, DateSeparatorHandler dateSeparatorHandler, DateSeparatorHandler threadDateSeparatorHandler, MessagePositionHandler messagePositionHandler, Boolean showDateSeparatorInEmptyThread)
        Parameters:
        cid - 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 limit of the messages to load in a single page.
        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.
      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid, String messageId, String parentMessageId, ChatClient chatClient, ClientState clientState, StreamMediaRecorder mediaRecorder, UserLookupHandler userLookupHandler, Function1<File, String> fileToUri, Integer messageLimit, Boolean enforceUniqueReactions, Integer maxAttachmentCount, Boolean showSystemMessages, DeletedMessageVisibility deletedMessageVisibility, MessageFooterVisibility messageFooterVisibility, DateSeparatorHandler dateSeparatorHandler, DateSeparatorHandler threadDateSeparatorHandler, MessagePositionHandler messagePositionHandler)
        Parameters:
        cid - 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 limit of the messages to load in a single page.
        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.
      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid, String messageId, String parentMessageId, ChatClient chatClient, ClientState clientState, StreamMediaRecorder mediaRecorder, UserLookupHandler userLookupHandler, Function1<File, String> fileToUri, Integer messageLimit, Boolean enforceUniqueReactions, Integer maxAttachmentCount, Boolean showSystemMessages, DeletedMessageVisibility deletedMessageVisibility, MessageFooterVisibility messageFooterVisibility, DateSeparatorHandler dateSeparatorHandler, DateSeparatorHandler threadDateSeparatorHandler)
        Parameters:
        cid - 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 limit of the messages to load in a single page.
        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.
      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid, String messageId, String parentMessageId, ChatClient chatClient, ClientState clientState, StreamMediaRecorder mediaRecorder, UserLookupHandler userLookupHandler, Function1<File, String> fileToUri, Integer messageLimit, Boolean enforceUniqueReactions, Integer maxAttachmentCount, Boolean showSystemMessages, DeletedMessageVisibility deletedMessageVisibility, MessageFooterVisibility messageFooterVisibility, DateSeparatorHandler dateSeparatorHandler)
        Parameters:
        cid - 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 limit of the messages to load in a single page.
        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.
      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid, String messageId, String parentMessageId, ChatClient chatClient, ClientState clientState, StreamMediaRecorder mediaRecorder, UserLookupHandler userLookupHandler, Function1<File, String> fileToUri, Integer messageLimit, Boolean enforceUniqueReactions, Integer maxAttachmentCount, Boolean showSystemMessages, DeletedMessageVisibility deletedMessageVisibility, MessageFooterVisibility messageFooterVisibility)
        Parameters:
        cid - 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 limit of the messages to load in a single page.
        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.
      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid, String messageId, String parentMessageId, ChatClient chatClient, ClientState clientState, StreamMediaRecorder mediaRecorder, UserLookupHandler userLookupHandler, Function1<File, String> fileToUri, Integer messageLimit, Boolean enforceUniqueReactions, Integer maxAttachmentCount, Boolean showSystemMessages, DeletedMessageVisibility deletedMessageVisibility)
        Parameters:
        cid - 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 limit of the messages to load in a single page.
        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.
      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid, String messageId, String parentMessageId, ChatClient chatClient, ClientState clientState, StreamMediaRecorder mediaRecorder, UserLookupHandler userLookupHandler, Function1<File, String> fileToUri, Integer messageLimit, Boolean enforceUniqueReactions, Integer maxAttachmentCount, Boolean showSystemMessages)
        Parameters:
        cid - 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 limit of the messages to load in a single page.
        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.
      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid, String messageId, String parentMessageId, ChatClient chatClient, ClientState clientState, StreamMediaRecorder mediaRecorder, UserLookupHandler userLookupHandler, Function1<File, String> fileToUri, Integer messageLimit, Boolean enforceUniqueReactions, Integer maxAttachmentCount)
        Parameters:
        cid - 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 limit of the messages to load in a single page.
        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.
      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid, String messageId, String parentMessageId, ChatClient chatClient, ClientState clientState, StreamMediaRecorder mediaRecorder, UserLookupHandler userLookupHandler, Function1<File, String> fileToUri, Integer messageLimit, Boolean enforceUniqueReactions)
        Parameters:
        cid - 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 limit of the messages to load in a single page.
        enforceUniqueReactions - Flag to enforce unique reactions or enable multiple from the same user.
      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid, String messageId, String parentMessageId, ChatClient chatClient, ClientState clientState, StreamMediaRecorder mediaRecorder, UserLookupHandler userLookupHandler, Function1<File, String> fileToUri, Integer messageLimit)
        Parameters:
        cid - 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 limit of the messages to load in a single page.
      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid, String messageId, String parentMessageId, ChatClient chatClient, ClientState clientState, StreamMediaRecorder mediaRecorder, UserLookupHandler userLookupHandler, Function1<File, String> fileToUri)
        Parameters:
        cid - 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.
      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid, String messageId, String parentMessageId, ChatClient chatClient, ClientState clientState, StreamMediaRecorder mediaRecorder, UserLookupHandler userLookupHandler)
        Parameters:
        cid - 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.
      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid, String messageId, String parentMessageId, ChatClient chatClient, ClientState clientState, StreamMediaRecorder mediaRecorder)
        Parameters:
        cid - 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.
      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid, String messageId, String parentMessageId, ChatClient chatClient, ClientState clientState)
        Parameters:
        cid - 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.
      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid, String messageId, String parentMessageId, ChatClient chatClient)
        Parameters:
        cid - 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.
      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid, String messageId, String parentMessageId)
        Parameters:
        cid - 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.
      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid, String messageId)
        Parameters:
        cid - 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.
      • MessageListViewModelFactory

        MessageListViewModelFactory(Context context, String cid)
        Parameters:
        cid - The current channel ID, to load the messages from.