MediaGalleryPreviewContract
class MediaGalleryPreviewContract(config: MediaGalleryConfig = MediaGalleryConfig()) : ActivityResultContract<MediaGalleryPreviewContract.Input, MediaGalleryPreviewResult?>
The contract used to start the MediaGalleryPreviewActivity given a message ID and the position of the clicked attachment.
Parameters
config
The configuration for the media gallery.
Types
Link copied to clipboard
class Input(val message: Message, val selectedAttachmentUrl: String? = null, val videoThumbnailsEnabled: Boolean, val streamCdnImageResizing: StreamCdnImageResizing, val skipEnrichUrl: Boolean = false)
Defines the input for the MediaGalleryPreviewContract.
Functions
Link copied to clipboard
Creates the intent to start the MediaGalleryPreviewActivity.
Link copied to clipboard
open fun getSynchronousResult(context: Context, input: MediaGalleryPreviewContract.Input): ActivityResultContract.SynchronousResult<MediaGalleryPreviewResult?>?
Link copied to clipboard
We parse the result as MediaGalleryPreviewResult, which can be null in case there is no result to return.