newInstance
fun newInstance(style: AttachmentsPickerDialogStyle, attachmentsPickerTabFactories: List<AttachmentsPickerTabFactory> = if (style.useDefaultSystemMediaPicker) {
AttachmentsPickerTabFactories
.defaultFactoriesWithoutPermissions(
mediaAttachmentsTabEnabled = style.mediaAttachmentsTabEnabled,
fileAttachmentsTabEnabled = style.fileAttachmentsTabEnabled,
cameraAttachmentsTabEnabled = style.cameraAttachmentsTabEnabled,
pollAttachmentsTabEnabled = style.pollAttachmentsTabEnabled,
)
} else {
AttachmentsPickerTabFactories.defaultFactories(
mediaAttachmentsTabEnabled = style.mediaAttachmentsTabEnabled,
fileAttachmentsTabEnabled = style.fileAttachmentsTabEnabled,
cameraAttachmentsTabEnabled = style.cameraAttachmentsTabEnabled,
pollAttachmentsTabEnabled = style.pollAttachmentsTabEnabled,
)
}): AttachmentsPickerDialogFragment
Creates a new instance of AttachmentsPickerDialogFragment.
Return
A new instance of AttachmentsPickerDialogFragment.
Parameters
style
Style for the dialog.
attachmentsPickerTabFactories
The list of factories for the tabs in the attachment picker.