MediaGalleryPreviewContract

The contract used to start the MediaGalleryPreviewActivity given a message ID and the position of the clicked attachment.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
class Input(val message: Message, val initialPosition: Int = 0, val videoThumbnailsEnabled: Boolean, val streamCdnImageResizing: StreamCdnImageResizing, val skipEnrichUrl: Boolean = false)

Defines the input for the MediaGalleryPreviewContract.

Functions

Link copied to clipboard
open override fun createIntent(context: Context, input: MediaGalleryPreviewContract.Input): Intent

Creates the intent to start the MediaGalleryPreviewActivity. It receives a data pair of a String and an Int that represent the messageId and the attachmentPosition.

Link copied to clipboard
open override fun parseResult(resultCode: Int, intent: Intent?): MediaGalleryPreviewResult?

We parse the result as MediaGalleryPreviewResult, which can be null in case there is no result to return.