GiphyAttachmentFactory

fun GiphyAttachmentFactory(giphyInfoType: GiphyInfoType = GiphyInfoType.FIXED_HEIGHT_DOWNSAMPLED, giphySizingMode: GiphySizingMode = GiphySizingMode.ADAPTIVE, contentScale: ContentScale = ContentScale.Crop, onContentItemClick: (context: Context, Url: String) -> Unit = ::onGiphyAttachmentContentClick): AttachmentFactory

An AttachmentFactory that validates and shows Giphy attachments using GiphyAttachmentContent.

Has no "preview content", given that this attachment only exists after being sent.

Return

Returns an instance of AttachmentFactory that is used to handle Giphys.

Parameters

giphyInfoType

Used to modify the quality and dimensions of the rendered Giphy attachments.

giphySizingMode

Sets the Giphy container sizing strategy. Setting it to automatic makes the container capable of adaptive resizing and ignore StreamDimens.attachmentsContentGiphyWidth and StreamDimens.attachmentsContentGiphyHeight dimensions, however you can still clip maximum dimensions using StreamDimens.attachmentsContentGiphyMaxWidth and StreamDimens.attachmentsContentGiphyMaxHeight. Setting it to fixed size mode will make it respect all given dimensions.

contentScale

Used to determine the way Giphys are scaled inside the Image composable.

onContentItemClick

Lambda called when an item gets clicked.