MediaGalleryPreviewContract
class MediaGalleryPreviewContract : ActivityResultContract<MediaGalleryPreviewContract.Input, MediaGalleryPreviewResult?>
The contract used to start the MediaGalleryPreviewActivity given a message ID and the position of the clicked attachment.
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
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
We parse the result as MediaGalleryPreviewResult, which can be null in case there is no result to return.
Inherited functions
Link copied to clipboard
open fun getSynchronousResult(context: Context, input: MediaGalleryPreviewContract.Input): ActivityResultContract.SynchronousResult<MediaGalleryPreviewResult?>?