-
public class StreamAttachmentFactoriesProvides different attachment factories that build custom message content based on a given attachment.
-
-
Field Summary
Fields Modifier and Type Field Description public final static StreamAttachmentFactoriesINSTANCE
-
Method Summary
Modifier and Type Method Description final List<AttachmentFactory>defaultFactories(Function0<ChatClient> getChatClient, Integer linkDescriptionMaxLines, GiphyInfoType giphyInfoType, GiphySizingMode giphySizingMode, ContentScale contentScale, Boolean skipEnrichUrl, Function2<Attachment, List<AttachmentPreviewHandler>, Unit> onUploadContentItemClick, Function2<Context, String, Unit> onLinkContentItemClick, Function2<Context, String, Unit> onGiphyContentItemClick, Function8<ManagedActivityResultLauncher<MediaGalleryPreviewContract.Input, MediaGalleryPreviewResult>, Message, Integer, Boolean, DownloadAttachmentUriGenerator, DownloadRequestInterceptor, StreamCdnImageResizing, Boolean, Unit> onMediaContentItemClick, Function1<Attachment, Boolean> showFileSize, Function2<List<AttachmentPreviewHandler>, Attachment, Unit> onFileContentItemClick, List<AttachmentFactory.Type> skipTypes)Default attachment factories we provide, which can transform image, file and link attachments. final List<AttachmentFactory>defaults(Function0<ChatClient> getChatClient, Integer linkDescriptionMaxLines, GiphyInfoType giphyInfoType, GiphySizingMode giphySizingMode, ContentScale contentScale, Boolean skipEnrichUrl, Function2<Attachment, List<AttachmentPreviewHandler>, Unit> onUploadContentItemClick, Function1<LinkAttachmentClickData, Unit> onLinkContentItemClick, Function1<GiphyAttachmentClickData, Unit> onGiphyContentItemClick, Function1<MediaAttachmentClickData, Unit> onMediaContentItemClick, Function1<Attachment, Boolean> showFileSize, Function2<List<AttachmentPreviewHandler>, Attachment, Unit> onFileContentItemClick, List<AttachmentFactory.Type> skipTypes)final List<AttachmentFactory>defaultQuotedFactories()Default quoted attachment factories we provide, which can transform image, file and link attachments. -
-
Method Detail
-
defaultFactories
@Deprecated(message = Use defaults() method instead., replaceWith = @ReplaceWith(imports = {}, expression = defaults(...)), level = DeprecationLevel.WARNING) final List<AttachmentFactory> defaultFactories(Function0<ChatClient> getChatClient, Integer linkDescriptionMaxLines, GiphyInfoType giphyInfoType, GiphySizingMode giphySizingMode, ContentScale contentScale, Boolean skipEnrichUrl, Function2<Attachment, List<AttachmentPreviewHandler>, Unit> onUploadContentItemClick, Function2<Context, String, Unit> onLinkContentItemClick, Function2<Context, String, Unit> onGiphyContentItemClick, Function8<ManagedActivityResultLauncher<MediaGalleryPreviewContract.Input, MediaGalleryPreviewResult>, Message, Integer, Boolean, DownloadAttachmentUriGenerator, DownloadRequestInterceptor, StreamCdnImageResizing, Boolean, Unit> onMediaContentItemClick, Function1<Attachment, Boolean> showFileSize, Function2<List<AttachmentPreviewHandler>, Attachment, Unit> onFileContentItemClick, List<AttachmentFactory.Type> skipTypes)
Default attachment factories we provide, which can transform image, file and link attachments.
- Parameters:
getChatClient-A lambda that provides the ChatClient instance.
linkDescriptionMaxLines-The limit of how long the link attachment descriptions can be.
giphyInfoType- Used to modify the quality and dimensions of the rendered Giphy attachments.giphySizingMode- Sets the Giphy container sizing strategy.contentScale- Used to determine the way Giphys are scaled inside the Image composable.skipEnrichUrl- Used by the media gallery.onUploadContentItemClick- Lambda called when a uploading attachment content item gets clicked.onLinkContentItemClick- Lambda called when a link attachment content item gets clicked.onGiphyContentItemClick- Lambda called when a giphy attachment content item gets clicked.onMediaContentItemClick- Lambda called when a image or video attachment content item gets clicked.showFileSize- Lambda called to determine if the file size should be shown for a given attachment.onFileContentItemClick- Lambda called when a file attachment content item gets clicked.skipTypes- A list of AttachmentFactory.Type that should be skipped from the default factories.
-
defaults
final List<AttachmentFactory> defaults(Function0<ChatClient> getChatClient, Integer linkDescriptionMaxLines, GiphyInfoType giphyInfoType, GiphySizingMode giphySizingMode, ContentScale contentScale, Boolean skipEnrichUrl, Function2<Attachment, List<AttachmentPreviewHandler>, Unit> onUploadContentItemClick, Function1<LinkAttachmentClickData, Unit> onLinkContentItemClick, Function1<GiphyAttachmentClickData, Unit> onGiphyContentItemClick, Function1<MediaAttachmentClickData, Unit> onMediaContentItemClick, Function1<Attachment, Boolean> showFileSize, Function2<List<AttachmentPreviewHandler>, Attachment, Unit> onFileContentItemClick, List<AttachmentFactory.Type> skipTypes)
-
defaultQuotedFactories
final List<AttachmentFactory> defaultQuotedFactories()
Default quoted attachment factories we provide, which can transform image, file and link attachments.
-
-
-
-