MediaGalleryPreviewViewModelFactory

class MediaGalleryPreviewViewModelFactory(chatClient: ChatClient, clientState: ClientState = chatClient.clientState, messageId: String, skipEnrichUrl: Boolean = false) : ViewModelProvider.Factory

Holds the dependencies required for the Media Preview Screen. Currently builds the MediaGalleryPreviewViewModel using those dependencies.

Parameters

chatClient

An instance of the low level client used for basic chat API functionality.

clientState

Holds information about the current SDK state.

messageId

The ID of the message we are fetching in order to display the attachments.

skipEnrichUrl

If set to true will skip enriching URLs when you update the message by deleting an attachment contained within it. Set to false by default.

Constructors

Link copied to clipboard
constructor(chatClient: ChatClient, clientState: ClientState = chatClient.clientState, messageId: String, skipEnrichUrl: Boolean = false)

Functions

Link copied to clipboard
open override fun <T : ViewModel> create(modelClass: Class<T>): T

Creates a new instance of MediaGalleryPreviewViewModel class.

Inherited functions

Link copied to clipboard
open fun <T : ViewModel> create(modelClass: Class<T>, extras: CreationExtras): T
open fun <T : ViewModel> create(modelClass: KClass<T>, extras: CreationExtras): T