Package 

Object StreamAttachmentFactories


  • 
    public class StreamAttachmentFactories
    
                        

    Provides different attachment factories that build custom message content based on a given attachment.

    • 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.