-
- All Implemented Interfaces:
-
io.getstream.chat.android.compose.ui.messages.attachments.factory.AttachmentsPickerTabFactory
public final class AttachmentsPickerSystemTabFactory implements AttachmentsPickerTabFactory
Holds the information required to add support for "files" tab in the attachment picker.
-
-
Field Summary
Fields Modifier and Type Field Description private final BooleanfilesAllowedprivate final BooleanmediaAllowedprivate final BooleancaptureImageAllowedprivate final BooleancaptureVideoAllowedprivate final BooleanpollAllowedprivate final AttachmentsPickerModeattachmentsPickerModeprivate final SystemAttachmentsPickerConfigconfig
-
Constructor Summary
Constructors Constructor Description AttachmentsPickerSystemTabFactory(List<AttachmentsPickerTabFactory> otherFactories)Holds the information required to add support for "files" tab in the attachment picker. AttachmentsPickerSystemTabFactory(Boolean filesAllowed, Boolean mediaAllowed, Boolean captureImageAllowed, Boolean captureVideoAllowed, Boolean pollAllowed)Holds the information required to add support for "files" tab in the attachment picker. AttachmentsPickerSystemTabFactory(SystemAttachmentsPickerConfig config)
-
Method Summary
Modifier and Type Method Description final BooleangetFilesAllowed()Returns whether file attachments are allowed. final BooleangetMediaAllowed()Returns whether visual media attachments are allowed. final BooleangetCaptureImageAllowed()Returns whether capturing images is allowed. final BooleangetCaptureVideoAllowed()Returns whether capturing videos is allowed. final BooleangetPollAllowed()Returns whether poll attachments are allowed. AttachmentsPickerModegetAttachmentsPickerMode()final SystemAttachmentsPickerConfiggetConfig()UnitPickerTabIcon(Boolean isEnabled, Boolean isSelected)Emits a file icon for this tab. UnitPickerTabContent(Function1<AttachmentPickerAction, Unit> onAttachmentPickerAction, List<AttachmentPickerItemState> attachments, Function1<List<AttachmentPickerItemState>, Unit> onAttachmentsChanged, Function1<AttachmentPickerItemState, Unit> onAttachmentItemSelected, Function1<List<AttachmentMetaData>, Unit> onAttachmentsSubmitted)Emits content that allows users to pick files in this tab. -
-
Constructor Detail
-
AttachmentsPickerSystemTabFactory
AttachmentsPickerSystemTabFactory(List<AttachmentsPickerTabFactory> otherFactories)
Holds the information required to add support for "files" tab in the attachment picker.- Parameters:
otherFactories- A list of other AttachmentsPickerTabFactory used to handle different attachment pickers.
-
AttachmentsPickerSystemTabFactory
AttachmentsPickerSystemTabFactory(Boolean filesAllowed, Boolean mediaAllowed, Boolean captureImageAllowed, Boolean captureVideoAllowed, Boolean pollAllowed)
Holds the information required to add support for "files" tab in the attachment picker.- Parameters:
filesAllowed- If the option to pick files is included in the attachments picker.mediaAllowed- If the option to pick media (images/videos) is included in the attachments picker.captureImageAllowed- If the option to capture an image is included in the attachments picker.captureVideoAllowed- If the option to capture a video is included in the attachments picker.pollAllowed- If the option to create a poll is included in the attachments picker.
-
AttachmentsPickerSystemTabFactory
AttachmentsPickerSystemTabFactory(SystemAttachmentsPickerConfig config)
- Parameters:
config- The configuration for the system attachment picker.
-
-
Method Detail
-
getFilesAllowed
final Boolean getFilesAllowed()
Returns whether file attachments are allowed.
-
getMediaAllowed
final Boolean getMediaAllowed()
Returns whether visual media attachments are allowed.
-
getCaptureImageAllowed
final Boolean getCaptureImageAllowed()
Returns whether capturing images is allowed.
-
getCaptureVideoAllowed
final Boolean getCaptureVideoAllowed()
Returns whether capturing videos is allowed.
-
getPollAllowed
final Boolean getPollAllowed()
Returns whether poll attachments are allowed.
-
getAttachmentsPickerMode
AttachmentsPickerMode getAttachmentsPickerMode()
-
getConfig
final SystemAttachmentsPickerConfig getConfig()
-
PickerTabIcon
@Composable() Unit PickerTabIcon(Boolean isEnabled, Boolean isSelected)
Emits a file icon for this tab.
- Parameters:
isEnabled- If the tab is enabled.isSelected- If the tab is selected.
-
PickerTabContent
@Composable() Unit PickerTabContent(Function1<AttachmentPickerAction, Unit> onAttachmentPickerAction, List<AttachmentPickerItemState> attachments, Function1<List<AttachmentPickerItemState>, Unit> onAttachmentsChanged, Function1<AttachmentPickerItemState, Unit> onAttachmentItemSelected, Function1<List<AttachmentMetaData>, Unit> onAttachmentsSubmitted)
Emits content that allows users to pick files in this tab.
- Parameters:
onAttachmentPickerAction- A lambda that will be invoked when an action is happened.attachments- The list of attachments to display.onAttachmentsChanged- Handler to set the loaded list of attachments to display.onAttachmentItemSelected- Handler when the item selection state changes.onAttachmentsSubmitted- Handler to submit the selected attachments to the message composer.
-
-
-
-